Fix TGM3 randomizer.

This commit is contained in:
Hana Nova 2025-05-16 17:05:54 +02:00
parent 6823f3bff0
commit 84b6166533
5 changed files with 432 additions and 400 deletions

Binary file not shown.

View File

@ -1,5 +1,5 @@
SUMMARY: SUMMARY:
ROM0: 14733 bytes used / 1651 free ROM0: 14759 bytes used / 1625 free
ROMX: 110971 bytes used / 36485 free in 9 banks ROMX: 110971 bytes used / 36485 free in 9 banks
SRAM: 2951 bytes used / 5241 free in 1 bank SRAM: 2951 bytes used / 5241 free in 1 bank
WRAM0: 3927 bytes used / 169 free WRAM0: 3927 bytes used / 169 free
@ -342,7 +342,7 @@ ROM0 bank #0:
$2c0f = SFXPlay.savePlayhead $2c0f = SFXPlay.savePlayhead
$2c18 = SFXGoRoll $2c18 = SFXGoRoll
$2c55 = SFXEndOfGame $2c55 = SFXEndOfGame
SECTION: $2ca6-$2ecc ($0227 bytes) ["RNG Functions"] SECTION: $2ca6-$2ee6 ($0241 bytes) ["RNG Functions"]
$2ca6 = HarvestEntropy $2ca6 = HarvestEntropy
$2cac = HarvestEntropy.loop $2cac = HarvestEntropy.loop
$2ccd = RNGInit $2ccd = RNGInit
@ -359,193 +359,196 @@ ROM0 bank #0:
$2d9e = \u00212 $2d9e = \u00212
$2db6 = \u00213 $2db6 = \u00213
$2db8 = GetNextNesPiece $2db8 = GetNextNesPiece
$2dc6 = GetNextTGM3Piece $2dc6 = TGM3SwapBag
$2dc9 = \u00214 $2dc6 = \u00214
$2dec = \u00215 $2dd4 = \u00215
$2def = \u00216 $2de2 = \u00216
$2dff = \u00217 $2dee = \u00217
$2e09 = \u00218 $2dfa = \u00218
$2e17 = \u00219 $2e06 = \u00219
$2e25 = \u002110 $2e12 = \u002110
$2e31 = \u002111 $2e1e = \u002111
$2e3d = \u002112 $2e2a = \u002112
$2e49 = \u002113 $2e39 = GetNextTGM3Piece
$2e55 = \u002114 $2e3c = GetNextTGM3Piece.retryGenerate
$2e61 = \u002115 $2e61 = GetNextTGM3Piece.replacePiece
$2e6d = \u002116 $2e68 = GetNextTGM3Piece.giveUp
$2e7c = GetNextPiece $2e76 = GetNextTGM3Piece.havePiece
$2e8a = GetNextPiece.nextpiecejumps $2e79 = \u002113
$2e99 = Next35Piece $2e89 = \u002114
$2e99 = \u002117 $2e96 = GetNextPiece
$2ea3 = Next7Piece $2ea4 = GetNextPiece.nextpiecejumps
$2ea3 = \u002118 $2eb3 = Next35Piece
$2ead = NextByte $2eb3 = \u002115
SECTION: $2ecd-$3091 ($01c5 bytes) ["Hi Score Functions"] $2ebd = Next7Piece
$2ecd = CheckAndAddHiscore $2ebd = \u002116
$2ed7 = CheckAndAddHiscore.checkloop $2ec7 = NextByte
$2edc = CheckAndAddHiscore.checkgrade SECTION: $2ee7-$30ab ($01c5 bytes) ["Hi Score Functions"]
$2ee5 = CheckAndAddHiscore.oldgraded $2ee7 = CheckAndAddHiscore
$2ef4 = CheckAndAddHiscore.oldungraded $2ef1 = CheckAndAddHiscore.checkloop
$2efb = CheckAndAddHiscore.checklevel $2ef6 = CheckAndAddHiscore.checkgrade
$2f20 = CheckAndAddHiscore.checkscore $2eff = CheckAndAddHiscore.oldgraded
$2f63 = CheckAndAddHiscore.notbetter $2f0e = CheckAndAddHiscore.oldungraded
$2f70 = CheckAndAddHiscore.better $2f15 = CheckAndAddHiscore.checklevel
$2f72 = InsertHiScore $2f3a = CheckAndAddHiscore.checkscore
$2f72 = InsertHiScore.copylower $2f7d = CheckAndAddHiscore.notbetter
$2f83 = InsertHiScore.copyupper $2f8a = CheckAndAddHiscore.better
$2f8f = \u00210 $2f8c = InsertHiScore
$2fa3 = InsertHiScore.findrow $2f8c = InsertHiScore.copylower
$2faf = \u00211 $2f9d = InsertHiScore.copyupper
$2fb3 = InsertHiScore.insert $2fa9 = \u00210
$300c = InsertHiScore.persist $2fbd = InsertHiScore.findrow
$301d = GetHiScoreEntry $2fc9 = \u00211
$3031 = \u00212 $2fcd = InsertHiScore.insert
$3035 = GetHiScoreEntry.store $3026 = InsertHiScore.persist
$303e = InitTargetHSTable $3037 = GetHiScoreEntry
$3049 = InitTargetHSTable.jumps $304b = \u00212
$305e = InitTargetHSTable.dmgt $304f = GetHiScoreEntry.store
$3063 = InitTargetHSTable.tgm1 $3058 = InitTargetHSTable
$3068 = InitTargetHSTable.tgm3 $3063 = InitTargetHSTable.jumps
$306d = InitTargetHSTable.deat $3078 = InitTargetHSTable.dmgt
$3072 = InitTargetHSTable.shir $307d = InitTargetHSTable.tgm1
$3077 = InitTargetHSTable.chil $3082 = InitTargetHSTable.tgm3
$307c = InitTargetHSTable.myco $3087 = InitTargetHSTable.deat
$307f = InitTargetHSTable.store $308c = InitTargetHSTable.shir
SECTION: $3092-$31de ($014d bytes) ["Time Functions"] $3091 = InitTargetHSTable.chil
$3092 = TimeInit $3096 = InitTargetHSTable.myco
$30bb = StartCountdown $3099 = InitTargetHSTable.store
$30c9 = ResetGameTime SECTION: $30ac-$31f8 ($014d bytes) ["Time Functions"]
$30dd = CheckTorikan $30ac = TimeInit
$30f3 = CheckTorikan.failure $30d5 = StartCountdown
$30f5 = CheckTorikan.success $30e3 = ResetGameTime
$30f8 = HandleTimers $30f7 = CheckTorikan
$311e = HandleTimers.reduce $310d = CheckTorikan.failure
$312b = HandleTimers.clock $310f = CheckTorikan.success
$3145 = HandleTimers.go $3112 = HandleTimers
$3169 = CheckCOOL_REGRET $3138 = HandleTimers.reduce
$3181 = CheckCOOL_REGRET.failure $3145 = HandleTimers.clock
$3183 = CheckCOOL_REGRET.success $315f = HandleTimers.go
$3186 = HandleSectionTimers $3183 = CheckCOOL_REGRET
$31a7 = HandleSectionTimers.continue $319b = CheckCOOL_REGRET.failure
$31bb = HandleSectionTimers.sectiongo $319d = CheckCOOL_REGRET.success
SECTION: $31df-$3328 ($014a bytes) ["Progress Data"] $31a0 = HandleSectionTimers
$31df = sProgressData $31c1 = HandleSectionTimers.continue
SECTION: $3329-$3468 ($0140 bytes) ["Hi Score Data"] $31d5 = HandleSectionTimers.sectiongo
$3329 = sHiscoreDefaultData SECTION: $31f9-$3342 ($014a bytes) ["Progress Data"]
SECTION: $3469-$3592 ($012a bytes) ["Input Functions"] $31f9 = sProgressData
$3469 = InputInit SECTION: $3343-$3482 ($0140 bytes) ["Hi Score Data"]
$347b = GetInput.btns $3343 = sHiscoreDefaultData
$347b = GetInput SECTION: $3483-$35ac ($012a bytes) ["Input Functions"]
$3488 = GetInput.readA $3483 = InputInit
$348c = GetInput.setA $3495 = GetInput.btns
$3497 = GetInput.clearA $3495 = GetInput
$349a = GetInput.readB $34a2 = GetInput.readA
$349e = GetInput.setB $34a6 = GetInput.setA
$34a9 = GetInput.clearB $34b1 = GetInput.clearA
$34ac = GetInput.readSelect $34b4 = GetInput.readB
$34b0 = GetInput.setSelect $34b8 = GetInput.setB
$34bb = GetInput.clearSelect $34c3 = GetInput.clearB
$34be = GetInput.readStart $34c6 = GetInput.readSelect
$34c2 = GetInput.setStart $34ca = GetInput.setSelect
$34cd = GetInput.clearStart $34d5 = GetInput.clearSelect
$34d0 = GetInput.dpad $34d8 = GetInput.readStart
$34dd = GetInput.readUp $34dc = GetInput.setStart
$34e1 = GetInput.setUp $34e7 = GetInput.clearStart
$34ec = GetInput.clearUp $34ea = GetInput.dpad
$34ef = GetInput.readDown $34f7 = GetInput.readUp
$34f3 = GetInput.setDown $34fb = GetInput.setUp
$34fe = GetInput.clearDown $3506 = GetInput.clearUp
$3501 = GetInput.readLeft $3509 = GetInput.readDown
$3505 = GetInput.setLeft $350d = GetInput.setDown
$3510 = GetInput.clearLeft $3518 = GetInput.clearDown
$3513 = GetInput.readRight $351b = GetInput.readLeft
$3517 = GetInput.setRight $351f = GetInput.setLeft
$3522 = GetInput.clearRight $352a = GetInput.clearLeft
$3525 = GetInput.priorities $352d = GetInput.readRight
$3532 = GetInput.jumps $3531 = GetInput.setRight
$3541 = GetInput.dlru $353c = GetInput.clearRight
$3551 = GetInput.ulrd $353f = GetInput.priorities
$3561 = GetInput.lrud $354c = GetInput.jumps
$356c = GetInput.udlr $355b = GetInput.dlru
$3577 = GetInput.zeroud $356b = GetInput.ulrd
$357d = GetInput.zerolr $357b = GetInput.lrud
$3583 = GetInput.zerolrd $3586 = GetInput.udlr
$358b = GetInput.zerolru $3591 = GetInput.zeroud
SECTION: $3593-$3672 ($00e0 bytes) ["Score Functions"] $3597 = GetInput.zerolr
$3593 = ScoreInit $359d = GetInput.zerolrd
$35bb = IncreaseScore $35a5 = GetInput.zerolru
$35f3 = IncreaseScore.doConvert SECTION: $35ad-$368c ($00e0 bytes) ["Score Functions"]
$35f5 = \u00210 $35ad = ScoreInit
$360b = IncreaseScore.carry $35d5 = IncreaseScore
$360d = IncreaseScore.postConvert $360d = IncreaseScore.doConvert
$361a = \u00211 $360f = \u00210
$3621 = IncreaseScore.preAddDigit $3625 = IncreaseScore.carry
$3649 = IncreaseScore.addDigit $3627 = IncreaseScore.postConvert
$365f = IncreaseScore.nextDigit $3634 = \u00211
SECTION: $3673-$373d ($00cb bytes) ["Title Function Trampolines"] $363b = IncreaseScore.preAddDigit
$3673 = SwitchToTitle $3663 = IncreaseScore.addDigit
$367c = TitleEventLoopHandler $3679 = IncreaseScore.nextDigit
$3686 = TitleVBlankHandler SECTION: $368d-$3757 ($00cb bytes) ["Title Function Trampolines"]
$3690 = PersistLevel $368d = SwitchToTitle
$369e = DrawSpeedMain $3696 = TitleEventLoopHandler
$36ee = DrawSpeedSettings $36a0 = TitleVBlankHandler
SECTION: $373e-$37ee ($00b1 bytes) ["Progress Functions"] $36aa = PersistLevel
$373e = SetProgress $36b8 = DrawSpeedMain
$3748 = SetProgress.loop $3708 = DrawSpeedSettings
$374c = SetProgress.correct SECTION: $3758-$3808 ($00b1 bytes) ["Progress Functions"]
$3773 = SetProgress.wvr_u1 $3758 = SetProgress
$377f = SetProgress.wvr_u2 $3762 = SetProgress.loop
$378d = SetProgress.wvr_u3 $3766 = SetProgress.correct
$3799 = SetProgress.wvr_u4 $378d = SetProgress.wvr_u1
$37a7 = SetProgress.wvr_u5 $3799 = SetProgress.wvr_u2
$37b3 = SetProgress.wvr_u6 $37a7 = SetProgress.wvr_u3
$37c1 = SetProgress.wvr_u7 $37b3 = SetProgress.wvr_u4
$37cd = SetProgress.wvr_u8 $37c1 = SetProgress.wvr_u5
$37db = SetProgress.wvr_u9 $37cd = SetProgress.wvr_u6
$37e7 = SetProgress.wvr_u10 $37db = SetProgress.wvr_u7
SECTION: $37ef-$3899 ($00ab bytes) ["Code Entry Point"] $37e7 = SetProgress.wvr_u8
$37ef = Main $37f5 = SetProgress.wvr_u9
$381c = Main.notgbc $3801 = SetProgress.wvr_u10
$382b = Main.wvr_u1 SECTION: $3809-$38b3 ($00ab bytes) ["Code Entry Point"]
$385b = EventLoop $3809 = Main
$3874 = EventLoop.eventloopjumps $3836 = Main.notgbc
$387d = EventLoopPostHandler $3845 = Main.wvr_u1
$387f = EventLoopPostHandler.wvb_u2 $3875 = EventLoop
$3891 = EventLoopPostHandler.vblankjumps $388e = EventLoop.eventloopjumps
SECTION: $389a-$38cf ($0036 bytes) ["Grading Functions Unbanked"] $3897 = EventLoopPostHandler
$389a = GradeInit $3899 = EventLoopPostHandler.wvb_u2
$38a3 = UpdateGrade $38ab = EventLoopPostHandler.vblankjumps
$38ac = DecayGradeProcess SECTION: $38b4-$38e9 ($0036 bytes) ["Grading Functions Unbanked"]
$38b5 = DecayGradeDelay $38b4 = GradeInit
$38be = TGM3REGRETHandler $38bd = UpdateGrade
$38c7 = TGM3COOLHandler $38c6 = DecayGradeProcess
SECTION: $38d0-$38fd ($002e bytes) ["Memory Functions"] $38cf = DecayGradeDelay
$38d0 = UnsafeMemCopy $38d8 = TGM3REGRETHandler
$38d9 = SafeMemCopy $38e1 = TGM3COOLHandler
$38d9 = SafeMemCopy.wvr_u1 SECTION: $38ea-$3917 ($002e bytes) ["Memory Functions"]
$38e8 = UnsafeMemSet $38ea = UnsafeMemCopy
$38f0 = SafeMemSet.wvr_u2 $38f3 = SafeMemCopy
$38f0 = SafeMemSet $38f3 = SafeMemCopy.wvr_u1
SECTION: $38fe-$3923 ($0026 bytes) ["Gameplay Function Trampolines"] $3902 = UnsafeMemSet
$38fe = SwitchToGameplay $390a = SafeMemSet.wvr_u2
$3907 = SwitchToGameplayBig $390a = SafeMemSet
$3910 = GamePlayEventLoopHandler SECTION: $3918-$393d ($0026 bytes) ["Gameplay Function Trampolines"]
$391a = GamePlayBigEventLoopHandler $3918 = SwitchToGameplay
SECTION: $3924-$3948 ($0025 bytes) ["Interrupt Initialization Functions"] $3921 = SwitchToGameplayBig
$3924 = EnableScreenSquish $392a = GamePlayEventLoopHandler
$393e = DisableScreenSquish $3934 = GamePlayBigEventLoopHandler
SECTION: $3949-$396a ($0022 bytes) ["OAM Functions"] SECTION: $393e-$3962 ($0025 bytes) ["Interrupt Initialization Functions"]
$3949 = CopyOAMHandler $393e = EnableScreenSquish
$3955 = ClearOAM $3958 = DisableScreenSquish
SECTION: $396b-$397b ($0011 bytes) ["Intro Effect Trampoline"] SECTION: $3963-$3984 ($0022 bytes) ["OAM Functions"]
$396b = DoIntroEffect $3963 = CopyOAMHandler
SECTION: $397c-$398a ($000f bytes) ["Banking Functions"] $396f = ClearOAM
$397c = BankingInit SECTION: $3985-$3995 ($0011 bytes) ["Intro Effect Trampoline"]
SECTION: $398b-$3994 ($000a bytes) ["OAM DMA Code"] $3985 = DoIntroEffect
$398b = OAMDMA SECTION: $3996-$39a4 ($000f bytes) ["Banking Functions"]
$3995 = OAMDMAEnd $3996 = BankingInit
EMPTY: $3995-$3fff ($066b bytes) SECTION: $39a5-$39ae ($000a bytes) ["OAM DMA Code"]
TOTAL EMPTY: $0673 bytes $39a5 = OAMDMA
$39af = OAMDMAEnd
EMPTY: $39af-$3fff ($0651 bytes)
TOTAL EMPTY: $0659 bytes
ROMX bank #1: ROMX bank #1:
SECTION: $4000-$4007 ($0008 bytes) ["Bank ID BANK_OTHER"] SECTION: $4000-$4007 ($0008 bytes) ["Bank ID BANK_OTHER"]

Binary file not shown.

View File

@ -270,154 +270,159 @@
00:2d7e GetNextTGM1Piece 00:2d7e GetNextTGM1Piece
00:2d9b GetNextTGM2Piece 00:2d9b GetNextTGM2Piece
00:2db8 GetNextNesPiece 00:2db8 GetNextNesPiece
00:2dc6 GetNextTGM3Piece 00:2dc6 TGM3SwapBag
00:2e7c GetNextPiece 00:2e39 GetNextTGM3Piece
00:2e8a GetNextPiece.nextpiecejumps 00:2e3c GetNextTGM3Piece.retryGenerate
00:2e99 Next35Piece 00:2e61 GetNextTGM3Piece.replacePiece
00:2ea3 Next7Piece 00:2e68 GetNextTGM3Piece.giveUp
00:2ead NextByte 00:2e76 GetNextTGM3Piece.havePiece
00:2ecd CheckAndAddHiscore 00:2e96 GetNextPiece
00:2ed7 CheckAndAddHiscore.checkloop 00:2ea4 GetNextPiece.nextpiecejumps
00:2edc CheckAndAddHiscore.checkgrade 00:2eb3 Next35Piece
00:2ee5 CheckAndAddHiscore.oldgraded 00:2ebd Next7Piece
00:2ef4 CheckAndAddHiscore.oldungraded 00:2ec7 NextByte
00:2efb CheckAndAddHiscore.checklevel 00:2ee7 CheckAndAddHiscore
00:2f20 CheckAndAddHiscore.checkscore 00:2ef1 CheckAndAddHiscore.checkloop
00:2f63 CheckAndAddHiscore.notbetter 00:2ef6 CheckAndAddHiscore.checkgrade
00:2f70 CheckAndAddHiscore.better 00:2eff CheckAndAddHiscore.oldgraded
00:2f72 InsertHiScore 00:2f0e CheckAndAddHiscore.oldungraded
00:2f72 InsertHiScore.copylower 00:2f15 CheckAndAddHiscore.checklevel
00:2f83 InsertHiScore.copyupper 00:2f3a CheckAndAddHiscore.checkscore
00:2fa3 InsertHiScore.findrow 00:2f7d CheckAndAddHiscore.notbetter
00:2fb3 InsertHiScore.insert 00:2f8a CheckAndAddHiscore.better
00:300c InsertHiScore.persist 00:2f8c InsertHiScore
00:301d GetHiScoreEntry 00:2f8c InsertHiScore.copylower
00:3035 GetHiScoreEntry.store 00:2f9d InsertHiScore.copyupper
00:303e InitTargetHSTable 00:2fbd InsertHiScore.findrow
00:3049 InitTargetHSTable.jumps 00:2fcd InsertHiScore.insert
00:305e InitTargetHSTable.dmgt 00:3026 InsertHiScore.persist
00:3063 InitTargetHSTable.tgm1 00:3037 GetHiScoreEntry
00:3068 InitTargetHSTable.tgm3 00:304f GetHiScoreEntry.store
00:306d InitTargetHSTable.deat 00:3058 InitTargetHSTable
00:3072 InitTargetHSTable.shir 00:3063 InitTargetHSTable.jumps
00:3077 InitTargetHSTable.chil 00:3078 InitTargetHSTable.dmgt
00:307c InitTargetHSTable.myco 00:307d InitTargetHSTable.tgm1
00:307f InitTargetHSTable.store 00:3082 InitTargetHSTable.tgm3
00:3092 TimeInit 00:3087 InitTargetHSTable.deat
00:30bb StartCountdown 00:308c InitTargetHSTable.shir
00:30c9 ResetGameTime 00:3091 InitTargetHSTable.chil
00:30dd CheckTorikan 00:3096 InitTargetHSTable.myco
00:30f3 CheckTorikan.failure 00:3099 InitTargetHSTable.store
00:30f5 CheckTorikan.success 00:30ac TimeInit
00:30f8 HandleTimers 00:30d5 StartCountdown
00:311e HandleTimers.reduce 00:30e3 ResetGameTime
00:312b HandleTimers.clock 00:30f7 CheckTorikan
00:3145 HandleTimers.go 00:310d CheckTorikan.failure
00:3169 CheckCOOL_REGRET 00:310f CheckTorikan.success
00:3181 CheckCOOL_REGRET.failure 00:3112 HandleTimers
00:3183 CheckCOOL_REGRET.success 00:3138 HandleTimers.reduce
00:3186 HandleSectionTimers 00:3145 HandleTimers.clock
00:31a7 HandleSectionTimers.continue 00:315f HandleTimers.go
00:31bb HandleSectionTimers.sectiongo 00:3183 CheckCOOL_REGRET
00:31df sProgressData 00:319b CheckCOOL_REGRET.failure
00:3329 sHiscoreDefaultData 00:319d CheckCOOL_REGRET.success
00:3469 InputInit 00:31a0 HandleSectionTimers
00:347b GetInput 00:31c1 HandleSectionTimers.continue
00:347b GetInput.btns 00:31d5 HandleSectionTimers.sectiongo
00:3488 GetInput.readA 00:31f9 sProgressData
00:348c GetInput.setA 00:3343 sHiscoreDefaultData
00:3497 GetInput.clearA 00:3483 InputInit
00:349a GetInput.readB 00:3495 GetInput
00:349e GetInput.setB 00:3495 GetInput.btns
00:34a9 GetInput.clearB 00:34a2 GetInput.readA
00:34ac GetInput.readSelect 00:34a6 GetInput.setA
00:34b0 GetInput.setSelect 00:34b1 GetInput.clearA
00:34bb GetInput.clearSelect 00:34b4 GetInput.readB
00:34be GetInput.readStart 00:34b8 GetInput.setB
00:34c2 GetInput.setStart 00:34c3 GetInput.clearB
00:34cd GetInput.clearStart 00:34c6 GetInput.readSelect
00:34d0 GetInput.dpad 00:34ca GetInput.setSelect
00:34dd GetInput.readUp 00:34d5 GetInput.clearSelect
00:34e1 GetInput.setUp 00:34d8 GetInput.readStart
00:34ec GetInput.clearUp 00:34dc GetInput.setStart
00:34ef GetInput.readDown 00:34e7 GetInput.clearStart
00:34f3 GetInput.setDown 00:34ea GetInput.dpad
00:34fe GetInput.clearDown 00:34f7 GetInput.readUp
00:3501 GetInput.readLeft 00:34fb GetInput.setUp
00:3505 GetInput.setLeft 00:3506 GetInput.clearUp
00:3510 GetInput.clearLeft 00:3509 GetInput.readDown
00:3513 GetInput.readRight 00:350d GetInput.setDown
00:3517 GetInput.setRight 00:3518 GetInput.clearDown
00:3522 GetInput.clearRight 00:351b GetInput.readLeft
00:3525 GetInput.priorities 00:351f GetInput.setLeft
00:3532 GetInput.jumps 00:352a GetInput.clearLeft
00:3541 GetInput.dlru 00:352d GetInput.readRight
00:3551 GetInput.ulrd 00:3531 GetInput.setRight
00:3561 GetInput.lrud 00:353c GetInput.clearRight
00:356c GetInput.udlr 00:353f GetInput.priorities
00:3577 GetInput.zeroud 00:354c GetInput.jumps
00:357d GetInput.zerolr 00:355b GetInput.dlru
00:3583 GetInput.zerolrd 00:356b GetInput.ulrd
00:358b GetInput.zerolru 00:357b GetInput.lrud
00:3593 ScoreInit 00:3586 GetInput.udlr
00:35bb IncreaseScore 00:3591 GetInput.zeroud
00:35f3 IncreaseScore.doConvert 00:3597 GetInput.zerolr
00:360b IncreaseScore.carry 00:359d GetInput.zerolrd
00:360d IncreaseScore.postConvert 00:35a5 GetInput.zerolru
00:3621 IncreaseScore.preAddDigit 00:35ad ScoreInit
00:3649 IncreaseScore.addDigit 00:35d5 IncreaseScore
00:365f IncreaseScore.nextDigit 00:360d IncreaseScore.doConvert
00:3673 SwitchToTitle 00:3625 IncreaseScore.carry
00:367c TitleEventLoopHandler 00:3627 IncreaseScore.postConvert
00:3686 TitleVBlankHandler 00:363b IncreaseScore.preAddDigit
00:3690 PersistLevel 00:3663 IncreaseScore.addDigit
00:369e DrawSpeedMain 00:3679 IncreaseScore.nextDigit
00:36ee DrawSpeedSettings 00:368d SwitchToTitle
00:373e SetProgress 00:3696 TitleEventLoopHandler
00:3748 SetProgress.loop 00:36a0 TitleVBlankHandler
00:374c SetProgress.correct 00:36aa PersistLevel
00:3773 SetProgress.wvr_u1 00:36b8 DrawSpeedMain
00:377f SetProgress.wvr_u2 00:3708 DrawSpeedSettings
00:378d SetProgress.wvr_u3 00:3758 SetProgress
00:3799 SetProgress.wvr_u4 00:3762 SetProgress.loop
00:37a7 SetProgress.wvr_u5 00:3766 SetProgress.correct
00:37b3 SetProgress.wvr_u6 00:378d SetProgress.wvr_u1
00:37c1 SetProgress.wvr_u7 00:3799 SetProgress.wvr_u2
00:37cd SetProgress.wvr_u8 00:37a7 SetProgress.wvr_u3
00:37db SetProgress.wvr_u9 00:37b3 SetProgress.wvr_u4
00:37e7 SetProgress.wvr_u10 00:37c1 SetProgress.wvr_u5
00:37ef Main 00:37cd SetProgress.wvr_u6
00:381c Main.notgbc 00:37db SetProgress.wvr_u7
00:382b Main.wvr_u1 00:37e7 SetProgress.wvr_u8
00:385b EventLoop 00:37f5 SetProgress.wvr_u9
00:3874 EventLoop.eventloopjumps 00:3801 SetProgress.wvr_u10
00:387d EventLoopPostHandler 00:3809 Main
00:387f EventLoopPostHandler.wvb_u2 00:3836 Main.notgbc
00:3891 EventLoopPostHandler.vblankjumps 00:3845 Main.wvr_u1
00:389a GradeInit 00:3875 EventLoop
00:38a3 UpdateGrade 00:388e EventLoop.eventloopjumps
00:38ac DecayGradeProcess 00:3897 EventLoopPostHandler
00:38b5 DecayGradeDelay 00:3899 EventLoopPostHandler.wvb_u2
00:38be TGM3REGRETHandler 00:38ab EventLoopPostHandler.vblankjumps
00:38c7 TGM3COOLHandler 00:38b4 GradeInit
00:38d0 UnsafeMemCopy 00:38bd UpdateGrade
00:38d9 SafeMemCopy 00:38c6 DecayGradeProcess
00:38d9 SafeMemCopy.wvr_u1 00:38cf DecayGradeDelay
00:38e8 UnsafeMemSet 00:38d8 TGM3REGRETHandler
00:38f0 SafeMemSet 00:38e1 TGM3COOLHandler
00:38f0 SafeMemSet.wvr_u2 00:38ea UnsafeMemCopy
00:38fe SwitchToGameplay 00:38f3 SafeMemCopy
00:3907 SwitchToGameplayBig 00:38f3 SafeMemCopy.wvr_u1
00:3910 GamePlayEventLoopHandler 00:3902 UnsafeMemSet
00:391a GamePlayBigEventLoopHandler 00:390a SafeMemSet
00:3924 EnableScreenSquish 00:390a SafeMemSet.wvr_u2
00:393e DisableScreenSquish 00:3918 SwitchToGameplay
00:3949 CopyOAMHandler 00:3921 SwitchToGameplayBig
00:3955 ClearOAM 00:392a GamePlayEventLoopHandler
00:396b DoIntroEffect 00:3934 GamePlayBigEventLoopHandler
00:397c BankingInit 00:393e EnableScreenSquish
00:398b OAMDMA 00:3958 DisableScreenSquish
00:3995 OAMDMAEnd 00:3963 CopyOAMHandler
00:396f ClearOAM
00:3985 DoIntroEffect
00:3996 BankingInit
00:39a5 OAMDMA
00:39af OAMDMAEnd
01:4008 sDMGTSpeedCurve 01:4008 sDMGTSpeedCurve
01:4203 sDMGTSpeedCurveEnd 01:4203 sDMGTSpeedCurveEnd
01:4205 sDMGTSpeedCurveSpecialData 01:4205 sDMGTSpeedCurveSpecialData

View File

@ -249,69 +249,7 @@ GetNextNesPiece:
call Next7Piece call Next7Piece
jr ShiftHistory jr ShiftHistory
TGM3SwapBag:
; TGM3 mode... It's complex.
GetNextTGM3Piece:
ld a, 7
ld e, a
: dec e
jr z, :+
; Get a random index into the 35bag
call Next35Piece
ld [wTGM3GeneratedIdx], a
; Fetch the piece from the 35bag.
ld c, a
xor a, a
ld b, a
ld hl, wTGM3Bag
add hl, bc
ld a, [hl]
; Is it in the history?
ld hl, hPieceHistory
cp a, [hl]
jr z, :-
inc hl
cp a, [hl]
jr z, :-
inc hl
cp a, [hl]
jr z, :-
inc hl
cp a, [hl]
jr z, :-
; We have a piece. Save it.
: call ShiftHistory
; Increment all drought counters.
: ld hl, wTGM3Droughts
inc [hl]
inc hl
inc [hl]
inc hl
inc [hl]
inc hl
inc [hl]
inc hl
inc [hl]
inc hl
inc [hl]
inc hl
inc [hl]
; Set the drought of our most recently drawn piece to 0.
: ldh a, [hUpcomingPiece2]
ld c, a
xor a, a
ld b, a
ld hl, wTGM3Droughts
add hl, bc
ld [hl], a
; We pick an arbitrary piece to have the worst drought. ; We pick an arbitrary piece to have the worst drought.
: call Next7Piece : call Next7Piece
ld [wTGM3WorstDroughtIdx], a ld [wTGM3WorstDroughtIdx], a
@ -401,6 +339,92 @@ GetNextTGM3Piece:
ld [hl], a ld [hl], a
ret ret
; TGM3 mode... It's complex.
GetNextTGM3Piece:
ld a, 7
ld e, a
.retryGenerate
dec e
jr z, .giveUp
; Get a random index into the 35bag
call Next35Piece
ld [wTGM3GeneratedIdx], a
; Fetch the piece from the 35bag.
ld c, a
xor a, a
ld b, a
ld hl, wTGM3Bag
add hl, bc
ld a, [hl]
; Is it in the history?
ld hl, hPieceHistory
cp a, [hl]
jr z, .replacePiece
inc hl
cp a, [hl]
jr z, .replacePiece
inc hl
cp a, [hl]
jr z, .replacePiece
inc hl
cp a, [hl]
jr z, .replacePiece
jr .havePiece
.replacePiece
push de
call TGM3SwapBag
pop de
jr .retryGenerate
.giveUp
; Get a random index into the 35bag
call Next35Piece
ld [wTGM3GeneratedIdx], a
; Fetch the piece from the 35bag.
ld c, a
xor a, a
ld b, a
ld hl, wTGM3Bag
add hl, bc
ld a, [hl]
.havePiece
; We have a piece. Save it.
call ShiftHistory
; Increment all drought counters.
: ld hl, wTGM3Droughts
inc [hl]
inc hl
inc [hl]
inc hl
inc [hl]
inc hl
inc [hl]
inc hl
inc [hl]
inc hl
inc [hl]
inc hl
inc [hl]
; Set the drought of our most recently drawn piece to 0.
: ldh a, [hUpcomingPiece2]
ld c, a
xor a, a
ld b, a
ld hl, wTGM3Droughts
add hl, bc
ld [hl], a
jp TGM3SwapBag
; Gets the next piece depending on RNG mode. ; Gets the next piece depending on RNG mode.
GetNextPiece:: GetNextPiece::
ld hl, .nextpiecejumps ld hl, .nextpiecejumps