diff --git a/bin/DMGTRIS.GBC b/bin/DMGTRIS.GBC index 49ff389..c7b99b4 100644 Binary files a/bin/DMGTRIS.GBC and b/bin/DMGTRIS.GBC differ diff --git a/bin/DMGTRIS.map b/bin/DMGTRIS.map index b2d412a..6f25526 100644 --- a/bin/DMGTRIS.map +++ b/bin/DMGTRIS.map @@ -239,276 +239,290 @@ ROM0 bank #0: $20ac = UpdateGradeSHIR.disqualify $20bb = UpdateGradeSHIR.l1000 $20d1 = UpdateGradeSHIR.l500 - SECTION: $20e7-$245b ($0375 bytes) ["Level Functions"] - $20e7 = LevelInit - $214c = SpecialLevelInit - $215a = SpecialLevelInit.jumps - $216f = SpecialLevelInit.dmgt - $2174 = SpecialLevelInit.tgm1 - $2179 = SpecialLevelInit.tgm3 - $217e = SpecialLevelInit.deat - $2183 = SpecialLevelInit.shir - $2188 = SpecialLevelInit.chil - $218d = SpecialLevelInit.myco - $2192 = SpecialLevelInit.loaddata - $21c7 = LevelUp - $21f1 = LevelUp.doit - $223b = LevelUp.checknlevel - $2269 = !0 - $2281 = !1 - $228a = LevelUp.bellmaybe - $22a3 = LevelUp.leveljinglemaybe - $22b0 = LevelUp.checkspeedup - $22c4 = !2 - $22d1 = !3 - $22e2 = !4 - $22ef = DoSpeedUp - $2330 = CheckSpecialLevelConditions - $2361 = CheckSpecialLevelConditions.override - $237c = CheckSpecialLevelConditions.nooverride - $2382 = CheckSpecialLevelConditions.speciallock - $23a3 = CheckSpecialLevelConditions.bones - $23b8 = CheckSpecialLevelConditions.enterthebonezone - $23bd = CheckSpecialLevelConditions.invis - $23d2 = CheckSpecialLevelConditions.vanishoxyaction - $23d7 = CheckSpecialLevelConditions.killscreen - $23e8 = CheckSpecialLevelConditions.rip - $2418 = CheckSpecialLevelConditions.staffroll - $2426 = CheckSpecialLevelConditions.justkill - $243a = TriggerKillScreen - SECTION: $245c-$2711 ($02b6 bytes) ["Grading Data"] - $245c = sTGM1GradeScores - $247e = sTGM3InternalGradeSystem - $251e = sTGM3GradeBoosts - $253d = sTGM3LevelMultiplier - $2541 = sTGM3BaselineCOOL - $254a = sTGM3REGRETConditions - $255e = sDMGTGrading - $2612 = sDMGTGaugeLUT - SECTION: $2712-$29ab ($029a bytes) ["SFX Functions"] - $2712 = SFXInit - $2734 = SFXPopQueue - $2749 = SFXPushQueue - $275a = SFXProcessQueue - $276b = !0 - $2786 = !1 - $2788 = SFXTriggerNoise - $2795 = !2 - $27a2 = !3 - $27ae = SFXEnqueue - $27c3 = SFXEnqueue.findsfx - $27d8 = !4 - $27e8 = !5 - $27f8 = !6 - $2808 = !7 - $2818 = !8 - $2828 = !9 - $2838 = !10 - $2848 = !11 - $2858 = !12 - $2868 = !13 - $2878 = !14 - $2888 = !15 - $2898 = !16 - $28a8 = !17 - $28b8 = !18 - $28c7 = !19 - $28d6 = !20 - $28e5 = !21 - $28f4 = !22 - $2902 = !23 - $2910 = !24 - $291d = SFXKill - $294a = SFXPlayNoise - $2955 = SFXPlayNoise.noisereg - $2962 = !25 - $296c = SFXPlayNoise.savenoiseplayhead - $2975 = SFXPlay - $2980 = !26 - $2983 = SFXPlay.play - $298f = SFXPlay.getRegister - $2999 = !27 - $29a3 = SFXPlay.savePlayhead - SECTION: $29ac-$2bdc ($0231 bytes) ["RNG Functions"] - $29ac = HarvestEntropy - $29b2 = HarvestEntropy.loop - $29d3 = RNGInit - $2a09 = !0 - $2a39 = RNGInit.complexinit - $2a50 = !1 - $2a6b = ShiftHistory - $2a88 = GetNextHellPiece - $2a8d = GetNextTGM1Piece - $2a90 = !2 - $2aa8 = !3 - $2aaa = GetNextTGM2Piece - $2aad = !4 - $2ac5 = !5 - $2ac7 = GetNextNesPiece - $2ad5 = GetNextTGM3Piece - $2ad8 = !6 - $2afb = !7 - $2afe = !8 - $2b0e = !9 - $2b18 = !10 - $2b26 = !11 - $2b35 = !12 - $2b41 = !13 - $2b4d = !14 - $2b59 = !15 - $2b65 = !16 - $2b71 = !17 - $2b7d = !18 - $2b8c = GetNextPiece - $2b9a = GetNextPiece.nextpiecejumps - $2ba9 = Next35Piece - $2ba9 = !19 - $2bb3 = Next7Piece - $2bb3 = !20 - $2bbd = NextByte - SECTION: $2bdd-$2e06 ($022a bytes) ["SRAM Functions"] - $2bdd = RestoreSRAM - $2c0d = TrustedLoad - $2c5f = TrustedLoad.jumps - $2c77 = TrustedLoad.dmgt - $2c7d = TrustedLoad.tgm1 - $2c83 = TrustedLoad.tgm3 - $2c89 = TrustedLoad.deat - $2c8f = TrustedLoad.shir - $2c95 = TrustedLoad.chil - $2c9b = TrustedLoad.myco - $2ca1 = TrustedLoad.search - $2cb3 = TrustedLoad.notfound - $2cba = TrustedLoad.fallback - $2cd5 = InitializeSRAM - $2d7e = NextProfile - $2d87 = NextProfile.update - $2d8a = ChangeProfile - $2d8a = ChangeProfile.backup - $2d9d = ChangeProfile.first - $2dab = ChangeProfile.second - $2db9 = ChangeProfile.third - $2dc7 = ChangeProfile.restore - $2dda = ChangeProfile.lfirst - $2de9 = ChangeProfile.lsecond - $2df8 = ChangeProfile.lthird - SECTION: $2e07-$2f50 ($014a bytes) ["Progress Data"] - $2e07 = sProgressData - SECTION: $2f51-$3030 ($00e0 bytes) ["Score Functions"] - $2f51 = ScoreInit - $2f79 = IncreaseScore - $2fb1 = IncreaseScore.doConvert - $2fb3 = !0 - $2fc9 = IncreaseScore.carry - $2fcb = IncreaseScore.postConvert - $2fd8 = !1 - $2fdf = IncreaseScore.preAddDigit - $3007 = IncreaseScore.addDigit - $301d = IncreaseScore.nextDigit - SECTION: $3031-$30fd ($00cd bytes) ["Input Functions"] - $3031 = InputInit - $3043 = GetInput - $3043 = GetInput.btns - $3050 = GetInput.readA - $3054 = GetInput.setA - $305f = GetInput.clearA - $3062 = GetInput.readB - $3066 = GetInput.setB - $3071 = GetInput.clearB - $3074 = GetInput.readSelect - $3078 = GetInput.setSelect - $3083 = GetInput.clearSelect - $3086 = GetInput.readStart - $308a = GetInput.setStart - $3095 = GetInput.clearStart - $3098 = GetInput.dpad - $30a5 = GetInput.readUp - $30a9 = GetInput.setUp - $30b4 = GetInput.clearUp - $30b7 = GetInput.readDown - $30bb = GetInput.setDown - $30c6 = GetInput.clearDown - $30c9 = GetInput.readLeft - $30cd = GetInput.setLeft - $30d8 = GetInput.clearLeft - $30db = GetInput.readRight - $30df = GetInput.setRight - $30ea = GetInput.clearRight - $30ed = GetInput.priorities - $30f8 = GetInput.zero - SECTION: $30fe-$31c8 ($00cb bytes) ["Title Function Trampolines"] - $30fe = SwitchToTitle - $3107 = TitleEventLoopHandler - $3111 = TitleVBlankHandler - $311b = PersistLevel - $3129 = DrawSpeedMain - $3179 = DrawSpeedSettings - SECTION: $31c9-$328e ($00c6 bytes) ["Time Functions"] - $31c9 = TimeInit - $31e9 = StartCountdown - $31f7 = ResetGameTime - $3202 = CheckTorikan - $3219 = CheckTorikan.failure - $321b = CheckTorikan.success - $321e = HandleTimers - $3244 = HandleTimers.reduce - $3251 = HandleTimers.clock - $326b = HandleTimers.go - SECTION: $328f-$3340 ($00b2 bytes) ["Progress Functions"] - $328f = SetProgress - $329a = SetProgress.loop - $329e = SetProgress.correct - $32c5 = SetProgress.wvr_u1 - $32d1 = SetProgress.wvr_u2 - $32df = SetProgress.wvr_u3 - $32eb = SetProgress.wvr_u4 - $32f9 = SetProgress.wvr_u5 - $3305 = SetProgress.wvr_u6 - $3313 = SetProgress.wvr_u7 - $331f = SetProgress.wvr_u8 - $332d = SetProgress.wvr_u9 - $3339 = SetProgress.wvr_u10 - SECTION: $3341-$33d2 ($0092 bytes) ["Code Entry Point"] - $3341 = Main - $336a = Main.notgbc - $3370 = Main.wvr_u1 - $3397 = EventLoop - $33ad = EventLoop.eventloopjumps - $33b6 = EventLoopPostHandler - $33b8 = EventLoopPostHandler.wvb_u2 - $33ca = EventLoopPostHandler.vblankjumps - SECTION: $33d3-$3424 ($0052 bytes) ["Tile Functions"] - $33d3 = LoadTitleTiles - $33f1 = LoadGameplayTiles - $3407 = LoadGameplayTiles.gbc - $3416 = LoadGameplayTiles.dmg - SECTION: $3425-$3460 ($003c bytes) ["Time Data"] - $3425 = sFramesToCS - SECTION: $3461-$348e ($002e bytes) ["Memory Functions"] - $3461 = UnsafeMemCopy - $346a = SafeMemCopy.wvr_u1 - $346a = SafeMemCopy - $3479 = UnsafeMemSet - $3481 = SafeMemSet - $3481 = SafeMemSet.wvr_u2 - SECTION: $348f-$34b4 ($0026 bytes) ["Gameplay Function Trampolines"] - $348f = SwitchToGameplay - $3498 = SwitchToGameplayBig - $34a1 = GamePlayEventLoopHandler - $34ab = GamePlayBigEventLoopHandler - SECTION: $34b5-$34d9 ($0025 bytes) ["Interrupt Initialization Functions"] - $34b5 = EnableScreenSquish - $34cf = DisableScreenSquish - SECTION: $34da-$34fb ($0022 bytes) ["OAM Functions"] - $34da = CopyOAMHandler - $34e6 = ClearOAM - SECTION: $34fc-$350a ($000f bytes) ["Banking Functions"] - $34fc = BankingInit - SECTION: $350b-$3514 ($000a bytes) ["OAM DMA Code"] - $350b = OAMDMA - $3515 = OAMDMAEnd - EMPTY: $3515-$3fff ($0aeb bytes) - TOTAL EMPTY: $0af6 bytes + SECTION: $20e7-$248b ($03a5 bytes) ["SRAM Functions"] + $20e7 = RestoreSRAM + $2117 = TrustedLoad + $2169 = TrustedLoad.jumps + $2181 = TrustedLoad.dmgt + $2187 = TrustedLoad.tgm1 + $218d = TrustedLoad.tgm3 + $2193 = TrustedLoad.deat + $2199 = TrustedLoad.shir + $219f = TrustedLoad.chil + $21a5 = TrustedLoad.myco + $21ab = TrustedLoad.search + $21bd = TrustedLoad.notfound + $21c4 = TrustedLoad.fallback + $21df = InitializeSRAM + $22ff = NextProfile + $2308 = NextProfile.update + $230b = ChangeProfile + $230b = ChangeProfile.backup + $233a = ChangeProfile.first + $2348 = ChangeProfile.second + $2356 = ChangeProfile.third + $2364 = ChangeProfile.fourth + $2372 = ChangeProfile.fifth + $2380 = ChangeProfile.sixth + $238e = ChangeProfile.seventh + $239c = ChangeProfile.eighth + $23aa = ChangeProfile.ninth + $23b8 = ChangeProfile.tenth + $23c6 = ChangeProfile.restore + $23f6 = ChangeProfile.lfirst + $2405 = ChangeProfile.lsecond + $2414 = ChangeProfile.lthird + $2423 = ChangeProfile.lfourth + $2432 = ChangeProfile.lfifth + $2441 = ChangeProfile.lsixth + $2450 = ChangeProfile.lseventh + $245f = ChangeProfile.leighth + $246e = ChangeProfile.lninth + $247d = ChangeProfile.ltenth + SECTION: $248c-$2800 ($0375 bytes) ["Level Functions"] + $248c = LevelInit + $24f1 = SpecialLevelInit + $24ff = SpecialLevelInit.jumps + $2514 = SpecialLevelInit.dmgt + $2519 = SpecialLevelInit.tgm1 + $251e = SpecialLevelInit.tgm3 + $2523 = SpecialLevelInit.deat + $2528 = SpecialLevelInit.shir + $252d = SpecialLevelInit.chil + $2532 = SpecialLevelInit.myco + $2537 = SpecialLevelInit.loaddata + $256c = LevelUp + $2596 = LevelUp.doit + $25e0 = LevelUp.checknlevel + $260e = !0 + $2626 = !1 + $262f = LevelUp.bellmaybe + $2648 = LevelUp.leveljinglemaybe + $2655 = LevelUp.checkspeedup + $2669 = !2 + $2676 = !3 + $2687 = !4 + $2694 = DoSpeedUp + $26d5 = CheckSpecialLevelConditions + $2706 = CheckSpecialLevelConditions.override + $2721 = CheckSpecialLevelConditions.nooverride + $2727 = CheckSpecialLevelConditions.speciallock + $2748 = CheckSpecialLevelConditions.bones + $275d = CheckSpecialLevelConditions.enterthebonezone + $2762 = CheckSpecialLevelConditions.invis + $2777 = CheckSpecialLevelConditions.vanishoxyaction + $277c = CheckSpecialLevelConditions.killscreen + $278d = CheckSpecialLevelConditions.rip + $27bd = CheckSpecialLevelConditions.staffroll + $27cb = CheckSpecialLevelConditions.justkill + $27df = TriggerKillScreen + SECTION: $2801-$2ab6 ($02b6 bytes) ["Grading Data"] + $2801 = sTGM1GradeScores + $2823 = sTGM3InternalGradeSystem + $28c3 = sTGM3GradeBoosts + $28e2 = sTGM3LevelMultiplier + $28e6 = sTGM3BaselineCOOL + $28ef = sTGM3REGRETConditions + $2903 = sDMGTGrading + $29b7 = sDMGTGaugeLUT + SECTION: $2ab7-$2d50 ($029a bytes) ["SFX Functions"] + $2ab7 = SFXInit + $2ad9 = SFXPopQueue + $2aee = SFXPushQueue + $2aff = SFXProcessQueue + $2b10 = !0 + $2b2b = !1 + $2b2d = SFXTriggerNoise + $2b3a = !2 + $2b47 = !3 + $2b53 = SFXEnqueue + $2b68 = SFXEnqueue.findsfx + $2b7d = !4 + $2b8d = !5 + $2b9d = !6 + $2bad = !7 + $2bbd = !8 + $2bcd = !9 + $2bdd = !10 + $2bed = !11 + $2bfd = !12 + $2c0d = !13 + $2c1d = !14 + $2c2d = !15 + $2c3d = !16 + $2c4d = !17 + $2c5d = !18 + $2c6c = !19 + $2c7b = !20 + $2c8a = !21 + $2c99 = !22 + $2ca7 = !23 + $2cb5 = !24 + $2cc2 = SFXKill + $2cef = SFXPlayNoise + $2cfa = SFXPlayNoise.noisereg + $2d07 = !25 + $2d11 = SFXPlayNoise.savenoiseplayhead + $2d1a = SFXPlay + $2d25 = !26 + $2d28 = SFXPlay.play + $2d34 = SFXPlay.getRegister + $2d3e = !27 + $2d48 = SFXPlay.savePlayhead + SECTION: $2d51-$2f81 ($0231 bytes) ["RNG Functions"] + $2d51 = HarvestEntropy + $2d57 = HarvestEntropy.loop + $2d78 = RNGInit + $2dae = !0 + $2dde = RNGInit.complexinit + $2df5 = !1 + $2e10 = ShiftHistory + $2e2d = GetNextHellPiece + $2e32 = GetNextTGM1Piece + $2e35 = !2 + $2e4d = !3 + $2e4f = GetNextTGM2Piece + $2e52 = !4 + $2e6a = !5 + $2e6c = GetNextNesPiece + $2e7a = GetNextTGM3Piece + $2e7d = !6 + $2ea0 = !7 + $2ea3 = !8 + $2eb3 = !9 + $2ebd = !10 + $2ecb = !11 + $2eda = !12 + $2ee6 = !13 + $2ef2 = !14 + $2efe = !15 + $2f0a = !16 + $2f16 = !17 + $2f22 = !18 + $2f31 = GetNextPiece + $2f3f = GetNextPiece.nextpiecejumps + $2f4e = Next35Piece + $2f4e = !19 + $2f58 = Next7Piece + $2f58 = !20 + $2f62 = NextByte + SECTION: $2f82-$30cb ($014a bytes) ["Progress Data"] + $2f82 = sProgressData + SECTION: $30cc-$31ab ($00e0 bytes) ["Score Functions"] + $30cc = ScoreInit + $30f4 = IncreaseScore + $312c = IncreaseScore.doConvert + $312e = !0 + $3144 = IncreaseScore.carry + $3146 = IncreaseScore.postConvert + $3153 = !1 + $315a = IncreaseScore.preAddDigit + $3182 = IncreaseScore.addDigit + $3198 = IncreaseScore.nextDigit + SECTION: $31ac-$3278 ($00cd bytes) ["Input Functions"] + $31ac = InputInit + $31be = GetInput + $31be = GetInput.btns + $31cb = GetInput.readA + $31cf = GetInput.setA + $31da = GetInput.clearA + $31dd = GetInput.readB + $31e1 = GetInput.setB + $31ec = GetInput.clearB + $31ef = GetInput.readSelect + $31f3 = GetInput.setSelect + $31fe = GetInput.clearSelect + $3201 = GetInput.readStart + $3205 = GetInput.setStart + $3210 = GetInput.clearStart + $3213 = GetInput.dpad + $3220 = GetInput.readUp + $3224 = GetInput.setUp + $322f = GetInput.clearUp + $3232 = GetInput.readDown + $3236 = GetInput.setDown + $3241 = GetInput.clearDown + $3244 = GetInput.readLeft + $3248 = GetInput.setLeft + $3253 = GetInput.clearLeft + $3256 = GetInput.readRight + $325a = GetInput.setRight + $3265 = GetInput.clearRight + $3268 = GetInput.priorities + $3273 = GetInput.zero + SECTION: $3279-$3343 ($00cb bytes) ["Title Function Trampolines"] + $3279 = SwitchToTitle + $3282 = TitleEventLoopHandler + $328c = TitleVBlankHandler + $3296 = PersistLevel + $32a4 = DrawSpeedMain + $32f4 = DrawSpeedSettings + SECTION: $3344-$3409 ($00c6 bytes) ["Time Functions"] + $3344 = TimeInit + $3364 = StartCountdown + $3372 = ResetGameTime + $337d = CheckTorikan + $3394 = CheckTorikan.failure + $3396 = CheckTorikan.success + $3399 = HandleTimers + $33bf = HandleTimers.reduce + $33cc = HandleTimers.clock + $33e6 = HandleTimers.go + SECTION: $340a-$34bb ($00b2 bytes) ["Progress Functions"] + $340a = SetProgress + $3415 = SetProgress.loop + $3419 = SetProgress.correct + $3440 = SetProgress.wvr_u1 + $344c = SetProgress.wvr_u2 + $345a = SetProgress.wvr_u3 + $3466 = SetProgress.wvr_u4 + $3474 = SetProgress.wvr_u5 + $3480 = SetProgress.wvr_u6 + $348e = SetProgress.wvr_u7 + $349a = SetProgress.wvr_u8 + $34a8 = SetProgress.wvr_u9 + $34b4 = SetProgress.wvr_u10 + SECTION: $34bc-$354d ($0092 bytes) ["Code Entry Point"] + $34bc = Main + $34e5 = Main.notgbc + $34eb = Main.wvr_u1 + $3512 = EventLoop + $3528 = EventLoop.eventloopjumps + $3531 = EventLoopPostHandler + $3533 = EventLoopPostHandler.wvb_u2 + $3545 = EventLoopPostHandler.vblankjumps + SECTION: $354e-$359f ($0052 bytes) ["Tile Functions"] + $354e = LoadTitleTiles + $356c = LoadGameplayTiles + $3582 = LoadGameplayTiles.gbc + $3591 = LoadGameplayTiles.dmg + SECTION: $35a0-$35db ($003c bytes) ["Time Data"] + $35a0 = sFramesToCS + SECTION: $35dc-$3609 ($002e bytes) ["Memory Functions"] + $35dc = UnsafeMemCopy + $35e5 = SafeMemCopy.wvr_u1 + $35e5 = SafeMemCopy + $35f4 = UnsafeMemSet + $35fc = SafeMemSet + $35fc = SafeMemSet.wvr_u2 + SECTION: $360a-$362f ($0026 bytes) ["Gameplay Function Trampolines"] + $360a = SwitchToGameplay + $3613 = SwitchToGameplayBig + $361c = GamePlayEventLoopHandler + $3626 = GamePlayBigEventLoopHandler + SECTION: $3630-$3654 ($0025 bytes) ["Interrupt Initialization Functions"] + $3630 = EnableScreenSquish + $364a = DisableScreenSquish + SECTION: $3655-$3676 ($0022 bytes) ["OAM Functions"] + $3655 = CopyOAMHandler + $3661 = ClearOAM + SECTION: $3677-$3685 ($000f bytes) ["Banking Functions"] + $3677 = BankingInit + SECTION: $3686-$368f ($000a bytes) ["OAM DMA Code"] + $3686 = OAMDMA + $3690 = OAMDMAEnd + EMPTY: $3690-$3fff ($0970 bytes) + TOTAL EMPTY: $097b bytes ROMX bank #1: SECTION: $4000-$4007 ($0008 bytes) ["Bank ID BANK_OTHER"] @@ -2452,7 +2466,7 @@ ROMX bank #6: TOTAL EMPTY: $1211 bytes SRAM bank #0: - SECTION: $a000-$a106 ($0107 bytes) ["Persistent Globals"] + SECTION: $a000-$a2c6 ($02c7 bytes) ["Persistent Globals"] $a000 = rCheck $a006 = rLastProfile $a007 = rProfileName @@ -2495,8 +2509,78 @@ SRAM bank #0: $a0cf = rAlways20GState2 $a0d0 = rSelectedStartLevel2 $a0d2 = rUnused2 - EMPTY: $a107-$bfff ($1ef9 bytes) - TOTAL EMPTY: $1ef9 bytes + $a107 = rProfileData3 + $a107 = rProfileName3 + $a10a = rSwapABState3 + $a10b = rRNGModeState3 + $a10c = rRotModeState3 + $a10d = rDropModeState3 + $a10e = rSpeedCurveState3 + $a10f = rAlways20GState3 + $a110 = rSelectedStartLevel3 + $a112 = rUnused3 + $a147 = rProfileData4 + $a147 = rProfileName4 + $a14a = rSwapABState4 + $a14b = rRNGModeState4 + $a14c = rRotModeState4 + $a14d = rDropModeState4 + $a14e = rSpeedCurveState4 + $a14f = rAlways20GState4 + $a150 = rSelectedStartLevel4 + $a152 = rUnused4 + $a187 = rProfileData5 + $a187 = rProfileName5 + $a18a = rSwapABState5 + $a18b = rRNGModeState5 + $a18c = rRotModeState5 + $a18d = rDropModeState5 + $a18e = rSpeedCurveState5 + $a18f = rAlways20GState5 + $a190 = rSelectedStartLevel5 + $a192 = rUnused5 + $a1c7 = rProfileData6 + $a1c7 = rProfileName6 + $a1ca = rSwapABState6 + $a1cb = rRNGModeState6 + $a1cc = rRotModeState6 + $a1cd = rDropModeState6 + $a1ce = rSpeedCurveState6 + $a1cf = rAlways20GState6 + $a1d0 = rSelectedStartLevel6 + $a1d2 = rUnused6 + $a207 = rProfileData7 + $a207 = rProfileName7 + $a20a = rSwapABState7 + $a20b = rRNGModeState7 + $a20c = rRotModeState7 + $a20d = rDropModeState7 + $a20e = rSpeedCurveState7 + $a20f = rAlways20GState7 + $a210 = rSelectedStartLevel7 + $a212 = rUnused7 + $a247 = rProfileData8 + $a247 = rProfileName8 + $a24a = rSwapABState8 + $a24b = rRNGModeState8 + $a24c = rRotModeState8 + $a24d = rDropModeState8 + $a24e = rSpeedCurveState8 + $a24f = rAlways20GState8 + $a250 = rSelectedStartLevel8 + $a252 = rUnused8 + $a287 = rProfileData9 + $a287 = rProfileName9 + $a28a = rSwapABState9 + $a28b = rRNGModeState9 + $a28c = rRotModeState9 + $a28d = rDropModeState9 + $a28e = rSpeedCurveState9 + $a28f = rAlways20GState9 + $a290 = rSelectedStartLevel9 + $a292 = rUnused9 + EMPTY: $a2c7-$bfff ($1d39 bytes) + TOTAL EMPTY: $1d39 bytes WRAM0 bank #0: SECTION: $c000-$c3ff ($0400 bytes) ["GBC Shadow Tilemap"] @@ -2730,8 +2814,8 @@ HRAM bank #0: TOTAL EMPTY: $0003 bytes SUMMARY: - ROM0: 13578 bytes used / 2806 free + ROM0: 13957 bytes used / 2427 free ROMX: 62762 bytes used / 35542 free in 6 banks - SRAM: 263 bytes used / 7929 free in 1 bank + SRAM: 711 bytes used / 7481 free in 1 bank WRAM0: 3545 bytes used / 551 free HRAM: 124 bytes used / 3 free diff --git a/bin/DMGTRIS.pocket b/bin/DMGTRIS.pocket index c194512..e1f9d9f 100644 Binary files a/bin/DMGTRIS.pocket and b/bin/DMGTRIS.pocket differ diff --git a/bin/DMGTRIS.sym b/bin/DMGTRIS.sym index d5064f4..dee73f8 100644 --- a/bin/DMGTRIS.sym +++ b/bin/DMGTRIS.sym @@ -201,198 +201,212 @@ 00:20ac UpdateGradeSHIR.disqualify 00:20bb UpdateGradeSHIR.l1000 00:20d1 UpdateGradeSHIR.l500 -00:20e7 LevelInit -00:214c SpecialLevelInit -00:215a SpecialLevelInit.jumps -00:216f SpecialLevelInit.dmgt -00:2174 SpecialLevelInit.tgm1 -00:2179 SpecialLevelInit.tgm3 -00:217e SpecialLevelInit.deat -00:2183 SpecialLevelInit.shir -00:2188 SpecialLevelInit.chil -00:218d SpecialLevelInit.myco -00:2192 SpecialLevelInit.loaddata -00:21c7 LevelUp -00:21f1 LevelUp.doit -00:223b LevelUp.checknlevel -00:228a LevelUp.bellmaybe -00:22a3 LevelUp.leveljinglemaybe -00:22b0 LevelUp.checkspeedup -00:22ef DoSpeedUp -00:2330 CheckSpecialLevelConditions -00:2361 CheckSpecialLevelConditions.override -00:237c CheckSpecialLevelConditions.nooverride -00:2382 CheckSpecialLevelConditions.speciallock -00:23a3 CheckSpecialLevelConditions.bones -00:23b8 CheckSpecialLevelConditions.enterthebonezone -00:23bd CheckSpecialLevelConditions.invis -00:23d2 CheckSpecialLevelConditions.vanishoxyaction -00:23d7 CheckSpecialLevelConditions.killscreen -00:23e8 CheckSpecialLevelConditions.rip -00:2418 CheckSpecialLevelConditions.staffroll -00:2426 CheckSpecialLevelConditions.justkill -00:243a TriggerKillScreen -00:245c sTGM1GradeScores -00:247e sTGM3InternalGradeSystem -00:251e sTGM3GradeBoosts -00:253d sTGM3LevelMultiplier -00:2541 sTGM3BaselineCOOL -00:254a sTGM3REGRETConditions -00:255e sDMGTGrading -00:2612 sDMGTGaugeLUT -00:2712 SFXInit -00:2734 SFXPopQueue -00:2749 SFXPushQueue -00:275a SFXProcessQueue -00:2788 SFXTriggerNoise -00:27ae SFXEnqueue -00:27c3 SFXEnqueue.findsfx -00:291d SFXKill -00:294a SFXPlayNoise -00:2955 SFXPlayNoise.noisereg -00:296c SFXPlayNoise.savenoiseplayhead -00:2975 SFXPlay -00:2983 SFXPlay.play -00:298f SFXPlay.getRegister -00:29a3 SFXPlay.savePlayhead -00:29ac HarvestEntropy -00:29b2 HarvestEntropy.loop -00:29d3 RNGInit -00:2a39 RNGInit.complexinit -00:2a6b ShiftHistory -00:2a88 GetNextHellPiece -00:2a8d GetNextTGM1Piece -00:2aaa GetNextTGM2Piece -00:2ac7 GetNextNesPiece -00:2ad5 GetNextTGM3Piece -00:2b8c GetNextPiece -00:2b9a GetNextPiece.nextpiecejumps -00:2ba9 Next35Piece -00:2bb3 Next7Piece -00:2bbd NextByte -00:2bdd RestoreSRAM -00:2c0d TrustedLoad -00:2c5f TrustedLoad.jumps -00:2c77 TrustedLoad.dmgt -00:2c7d TrustedLoad.tgm1 -00:2c83 TrustedLoad.tgm3 -00:2c89 TrustedLoad.deat -00:2c8f TrustedLoad.shir -00:2c95 TrustedLoad.chil -00:2c9b TrustedLoad.myco -00:2ca1 TrustedLoad.search -00:2cb3 TrustedLoad.notfound -00:2cba TrustedLoad.fallback -00:2cd5 InitializeSRAM -00:2d7e NextProfile -00:2d87 NextProfile.update -00:2d8a ChangeProfile -00:2d8a ChangeProfile.backup -00:2d9d ChangeProfile.first -00:2dab ChangeProfile.second -00:2db9 ChangeProfile.third -00:2dc7 ChangeProfile.restore -00:2dda ChangeProfile.lfirst -00:2de9 ChangeProfile.lsecond -00:2df8 ChangeProfile.lthird -00:2e07 sProgressData -00:2f51 ScoreInit -00:2f79 IncreaseScore -00:2fb1 IncreaseScore.doConvert -00:2fc9 IncreaseScore.carry -00:2fcb IncreaseScore.postConvert -00:2fdf IncreaseScore.preAddDigit -00:3007 IncreaseScore.addDigit -00:301d IncreaseScore.nextDigit -00:3031 InputInit -00:3043 GetInput -00:3043 GetInput.btns -00:3050 GetInput.readA -00:3054 GetInput.setA -00:305f GetInput.clearA -00:3062 GetInput.readB -00:3066 GetInput.setB -00:3071 GetInput.clearB -00:3074 GetInput.readSelect -00:3078 GetInput.setSelect -00:3083 GetInput.clearSelect -00:3086 GetInput.readStart -00:308a GetInput.setStart -00:3095 GetInput.clearStart -00:3098 GetInput.dpad -00:30a5 GetInput.readUp -00:30a9 GetInput.setUp -00:30b4 GetInput.clearUp -00:30b7 GetInput.readDown -00:30bb GetInput.setDown -00:30c6 GetInput.clearDown -00:30c9 GetInput.readLeft -00:30cd GetInput.setLeft -00:30d8 GetInput.clearLeft -00:30db GetInput.readRight -00:30df GetInput.setRight -00:30ea GetInput.clearRight -00:30ed GetInput.priorities -00:30f8 GetInput.zero -00:30fe SwitchToTitle -00:3107 TitleEventLoopHandler -00:3111 TitleVBlankHandler -00:311b PersistLevel -00:3129 DrawSpeedMain -00:3179 DrawSpeedSettings -00:31c9 TimeInit -00:31e9 StartCountdown -00:31f7 ResetGameTime -00:3202 CheckTorikan -00:3219 CheckTorikan.failure -00:321b CheckTorikan.success -00:321e HandleTimers -00:3244 HandleTimers.reduce -00:3251 HandleTimers.clock -00:326b HandleTimers.go -00:328f SetProgress -00:329a SetProgress.loop -00:329e SetProgress.correct -00:32c5 SetProgress.wvr_u1 -00:32d1 SetProgress.wvr_u2 -00:32df SetProgress.wvr_u3 -00:32eb SetProgress.wvr_u4 -00:32f9 SetProgress.wvr_u5 -00:3305 SetProgress.wvr_u6 -00:3313 SetProgress.wvr_u7 -00:331f SetProgress.wvr_u8 -00:332d SetProgress.wvr_u9 -00:3339 SetProgress.wvr_u10 -00:3341 Main -00:336a Main.notgbc -00:3370 Main.wvr_u1 -00:3397 EventLoop -00:33ad EventLoop.eventloopjumps -00:33b6 EventLoopPostHandler -00:33b8 EventLoopPostHandler.wvb_u2 -00:33ca EventLoopPostHandler.vblankjumps -00:33d3 LoadTitleTiles -00:33f1 LoadGameplayTiles -00:3407 LoadGameplayTiles.gbc -00:3416 LoadGameplayTiles.dmg -00:3425 sFramesToCS -00:3461 UnsafeMemCopy -00:346a SafeMemCopy.wvr_u1 -00:346a SafeMemCopy -00:3479 UnsafeMemSet -00:3481 SafeMemSet -00:3481 SafeMemSet.wvr_u2 -00:348f SwitchToGameplay -00:3498 SwitchToGameplayBig -00:34a1 GamePlayEventLoopHandler -00:34ab GamePlayBigEventLoopHandler -00:34b5 EnableScreenSquish -00:34cf DisableScreenSquish -00:34da CopyOAMHandler -00:34e6 ClearOAM -00:34fc BankingInit -00:350b OAMDMA -00:3515 OAMDMAEnd +00:20e7 RestoreSRAM +00:2117 TrustedLoad +00:2169 TrustedLoad.jumps +00:2181 TrustedLoad.dmgt +00:2187 TrustedLoad.tgm1 +00:218d TrustedLoad.tgm3 +00:2193 TrustedLoad.deat +00:2199 TrustedLoad.shir +00:219f TrustedLoad.chil +00:21a5 TrustedLoad.myco +00:21ab TrustedLoad.search +00:21bd TrustedLoad.notfound +00:21c4 TrustedLoad.fallback +00:21df InitializeSRAM +00:22ff NextProfile +00:2308 NextProfile.update +00:230b ChangeProfile +00:230b ChangeProfile.backup +00:233a ChangeProfile.first +00:2348 ChangeProfile.second +00:2356 ChangeProfile.third +00:2364 ChangeProfile.fourth +00:2372 ChangeProfile.fifth +00:2380 ChangeProfile.sixth +00:238e ChangeProfile.seventh +00:239c ChangeProfile.eighth +00:23aa ChangeProfile.ninth +00:23b8 ChangeProfile.tenth +00:23c6 ChangeProfile.restore +00:23f6 ChangeProfile.lfirst +00:2405 ChangeProfile.lsecond +00:2414 ChangeProfile.lthird +00:2423 ChangeProfile.lfourth +00:2432 ChangeProfile.lfifth +00:2441 ChangeProfile.lsixth +00:2450 ChangeProfile.lseventh +00:245f ChangeProfile.leighth +00:246e ChangeProfile.lninth +00:247d ChangeProfile.ltenth +00:248c LevelInit +00:24f1 SpecialLevelInit +00:24ff SpecialLevelInit.jumps +00:2514 SpecialLevelInit.dmgt +00:2519 SpecialLevelInit.tgm1 +00:251e SpecialLevelInit.tgm3 +00:2523 SpecialLevelInit.deat +00:2528 SpecialLevelInit.shir +00:252d SpecialLevelInit.chil +00:2532 SpecialLevelInit.myco +00:2537 SpecialLevelInit.loaddata +00:256c LevelUp +00:2596 LevelUp.doit +00:25e0 LevelUp.checknlevel +00:262f LevelUp.bellmaybe +00:2648 LevelUp.leveljinglemaybe +00:2655 LevelUp.checkspeedup +00:2694 DoSpeedUp +00:26d5 CheckSpecialLevelConditions +00:2706 CheckSpecialLevelConditions.override +00:2721 CheckSpecialLevelConditions.nooverride +00:2727 CheckSpecialLevelConditions.speciallock +00:2748 CheckSpecialLevelConditions.bones +00:275d CheckSpecialLevelConditions.enterthebonezone +00:2762 CheckSpecialLevelConditions.invis +00:2777 CheckSpecialLevelConditions.vanishoxyaction +00:277c CheckSpecialLevelConditions.killscreen +00:278d CheckSpecialLevelConditions.rip +00:27bd CheckSpecialLevelConditions.staffroll +00:27cb CheckSpecialLevelConditions.justkill +00:27df TriggerKillScreen +00:2801 sTGM1GradeScores +00:2823 sTGM3InternalGradeSystem +00:28c3 sTGM3GradeBoosts +00:28e2 sTGM3LevelMultiplier +00:28e6 sTGM3BaselineCOOL +00:28ef sTGM3REGRETConditions +00:2903 sDMGTGrading +00:29b7 sDMGTGaugeLUT +00:2ab7 SFXInit +00:2ad9 SFXPopQueue +00:2aee SFXPushQueue +00:2aff SFXProcessQueue +00:2b2d SFXTriggerNoise +00:2b53 SFXEnqueue +00:2b68 SFXEnqueue.findsfx +00:2cc2 SFXKill +00:2cef SFXPlayNoise +00:2cfa SFXPlayNoise.noisereg +00:2d11 SFXPlayNoise.savenoiseplayhead +00:2d1a SFXPlay +00:2d28 SFXPlay.play +00:2d34 SFXPlay.getRegister +00:2d48 SFXPlay.savePlayhead +00:2d51 HarvestEntropy +00:2d57 HarvestEntropy.loop +00:2d78 RNGInit +00:2dde RNGInit.complexinit +00:2e10 ShiftHistory +00:2e2d GetNextHellPiece +00:2e32 GetNextTGM1Piece +00:2e4f GetNextTGM2Piece +00:2e6c GetNextNesPiece +00:2e7a GetNextTGM3Piece +00:2f31 GetNextPiece +00:2f3f GetNextPiece.nextpiecejumps +00:2f4e Next35Piece +00:2f58 Next7Piece +00:2f62 NextByte +00:2f82 sProgressData +00:30cc ScoreInit +00:30f4 IncreaseScore +00:312c IncreaseScore.doConvert +00:3144 IncreaseScore.carry +00:3146 IncreaseScore.postConvert +00:315a IncreaseScore.preAddDigit +00:3182 IncreaseScore.addDigit +00:3198 IncreaseScore.nextDigit +00:31ac InputInit +00:31be GetInput +00:31be GetInput.btns +00:31cb GetInput.readA +00:31cf GetInput.setA +00:31da GetInput.clearA +00:31dd GetInput.readB +00:31e1 GetInput.setB +00:31ec GetInput.clearB +00:31ef GetInput.readSelect +00:31f3 GetInput.setSelect +00:31fe GetInput.clearSelect +00:3201 GetInput.readStart +00:3205 GetInput.setStart +00:3210 GetInput.clearStart +00:3213 GetInput.dpad +00:3220 GetInput.readUp +00:3224 GetInput.setUp +00:322f GetInput.clearUp +00:3232 GetInput.readDown +00:3236 GetInput.setDown +00:3241 GetInput.clearDown +00:3244 GetInput.readLeft +00:3248 GetInput.setLeft +00:3253 GetInput.clearLeft +00:3256 GetInput.readRight +00:325a GetInput.setRight +00:3265 GetInput.clearRight +00:3268 GetInput.priorities +00:3273 GetInput.zero +00:3279 SwitchToTitle +00:3282 TitleEventLoopHandler +00:328c TitleVBlankHandler +00:3296 PersistLevel +00:32a4 DrawSpeedMain +00:32f4 DrawSpeedSettings +00:3344 TimeInit +00:3364 StartCountdown +00:3372 ResetGameTime +00:337d CheckTorikan +00:3394 CheckTorikan.failure +00:3396 CheckTorikan.success +00:3399 HandleTimers +00:33bf HandleTimers.reduce +00:33cc HandleTimers.clock +00:33e6 HandleTimers.go +00:340a SetProgress +00:3415 SetProgress.loop +00:3419 SetProgress.correct +00:3440 SetProgress.wvr_u1 +00:344c SetProgress.wvr_u2 +00:345a SetProgress.wvr_u3 +00:3466 SetProgress.wvr_u4 +00:3474 SetProgress.wvr_u5 +00:3480 SetProgress.wvr_u6 +00:348e SetProgress.wvr_u7 +00:349a SetProgress.wvr_u8 +00:34a8 SetProgress.wvr_u9 +00:34b4 SetProgress.wvr_u10 +00:34bc Main +00:34e5 Main.notgbc +00:34eb Main.wvr_u1 +00:3512 EventLoop +00:3528 EventLoop.eventloopjumps +00:3531 EventLoopPostHandler +00:3533 EventLoopPostHandler.wvb_u2 +00:3545 EventLoopPostHandler.vblankjumps +00:354e LoadTitleTiles +00:356c LoadGameplayTiles +00:3582 LoadGameplayTiles.gbc +00:3591 LoadGameplayTiles.dmg +00:35a0 sFramesToCS +00:35dc UnsafeMemCopy +00:35e5 SafeMemCopy.wvr_u1 +00:35e5 SafeMemCopy +00:35f4 UnsafeMemSet +00:35fc SafeMemSet +00:35fc SafeMemSet.wvr_u2 +00:360a SwitchToGameplay +00:3613 SwitchToGameplayBig +00:361c GamePlayEventLoopHandler +00:3626 GamePlayBigEventLoopHandler +00:3630 EnableScreenSquish +00:364a DisableScreenSquish +00:3655 CopyOAMHandler +00:3661 ClearOAM +00:3677 BankingInit +00:3686 OAMDMA +00:3690 OAMDMAEnd 01:4008 sDMGTSpeedCurve 01:4203 sDMGTSpeedCurveEnd 01:4205 sDMGTSpeedCurveSpecialData @@ -2181,6 +2195,76 @@ 00:a0cf rAlways20GState2 00:a0d0 rSelectedStartLevel2 00:a0d2 rUnused2 +00:a107 rProfileData3 +00:a107 rProfileName3 +00:a10a rSwapABState3 +00:a10b rRNGModeState3 +00:a10c rRotModeState3 +00:a10d rDropModeState3 +00:a10e rSpeedCurveState3 +00:a10f rAlways20GState3 +00:a110 rSelectedStartLevel3 +00:a112 rUnused3 +00:a147 rProfileData4 +00:a147 rProfileName4 +00:a14a rSwapABState4 +00:a14b rRNGModeState4 +00:a14c rRotModeState4 +00:a14d rDropModeState4 +00:a14e rSpeedCurveState4 +00:a14f rAlways20GState4 +00:a150 rSelectedStartLevel4 +00:a152 rUnused4 +00:a187 rProfileData5 +00:a187 rProfileName5 +00:a18a rSwapABState5 +00:a18b rRNGModeState5 +00:a18c rRotModeState5 +00:a18d rDropModeState5 +00:a18e rSpeedCurveState5 +00:a18f rAlways20GState5 +00:a190 rSelectedStartLevel5 +00:a192 rUnused5 +00:a1c7 rProfileData6 +00:a1c7 rProfileName6 +00:a1ca rSwapABState6 +00:a1cb rRNGModeState6 +00:a1cc rRotModeState6 +00:a1cd rDropModeState6 +00:a1ce rSpeedCurveState6 +00:a1cf rAlways20GState6 +00:a1d0 rSelectedStartLevel6 +00:a1d2 rUnused6 +00:a207 rProfileData7 +00:a207 rProfileName7 +00:a20a rSwapABState7 +00:a20b rRNGModeState7 +00:a20c rRotModeState7 +00:a20d rDropModeState7 +00:a20e rSpeedCurveState7 +00:a20f rAlways20GState7 +00:a210 rSelectedStartLevel7 +00:a212 rUnused7 +00:a247 rProfileData8 +00:a247 rProfileName8 +00:a24a rSwapABState8 +00:a24b rRNGModeState8 +00:a24c rRotModeState8 +00:a24d rDropModeState8 +00:a24e rSpeedCurveState8 +00:a24f rAlways20GState8 +00:a250 rSelectedStartLevel8 +00:a252 rUnused8 +00:a287 rProfileData9 +00:a287 rProfileName9 +00:a28a rSwapABState9 +00:a28b rRNGModeState9 +00:a28c rRotModeState9 +00:a28d rDropModeState9 +00:a28e rSpeedCurveState9 +00:a28f rAlways20GState9 +00:a290 rSelectedStartLevel9 +00:a292 rUnused9 00:c000 wShadowTilemap 00:c400 wShadowTileAttrs 00:c800 wShadowOAM diff --git a/src/sram.asm b/src/sram.asm index bb27dca..1b262d7 100644 --- a/src/sram.asm +++ b/src/sram.asm @@ -22,6 +22,23 @@ DEF SRAM_ASM EQU 1 INCLUDE "globals.asm" +MACRO PROFILE +UNION +rProfileData\1:: ds 64 +NEXTU +rProfileName\1:: ds 3 +rSwapABState\1:: ds 1 +rRNGModeState\1:: ds 1 +rRotModeState\1:: ds 1 +rDropModeState\1:: ds 1 +rSpeedCurveState\1:: ds 1 +rAlways20GState\1:: ds 1 +rSelectedStartLevel\1:: ds 2 +rUnused\1:: ds (64-11) +ENDU +ENDM + + SECTION "Persistent Globals", SRAM rCheck:: ds 6 rLastProfile:: ds 1 @@ -38,45 +55,16 @@ rAlways20GState:: ds 1 rSelectedStartLevel:: ds 2 rUnused:: ds (64-11) ENDU -UNION -rProfileData0:: ds 64 -NEXTU -rProfileName0:: ds 3 -rSwapABState0:: ds 1 -rRNGModeState0:: ds 1 -rRotModeState0:: ds 1 -rDropModeState0:: ds 1 -rSpeedCurveState0:: ds 1 -rAlways20GState0:: ds 1 -rSelectedStartLevel0:: ds 2 -rUnused0:: ds (64-11) -ENDU -UNION -rProfileData1:: ds 64 -NEXTU -rProfileName1:: ds 3 -rSwapABState1:: ds 1 -rRNGModeState1:: ds 1 -rRotModeState1:: ds 1 -rDropModeState1:: ds 1 -rSpeedCurveState1:: ds 1 -rAlways20GState1:: ds 1 -rSelectedStartLevel1:: ds 2 -rUnused1:: ds (64-11) -ENDU -UNION -rProfileData2:: ds 64 -NEXTU -rProfileName2:: ds 3 -rSwapABState2:: ds 1 -rRNGModeState2:: ds 1 -rRotModeState2:: ds 1 -rDropModeState2:: ds 1 -rSpeedCurveState2:: ds 1 -rAlways20GState2:: ds 1 -rSelectedStartLevel2:: ds 2 -rUnused2:: ds (64-11) -ENDU + PROFILE 0 + PROFILE 1 + PROFILE 2 + PROFILE 3 + PROFILE 4 + PROFILE 5 + PROFILE 6 + PROFILE 7 + PROFILE 8 + PROFILE 9 SECTION "SRAM Variables", WRAM0 wTarget:: ds 1 @@ -102,7 +90,7 @@ RestoreSRAM:: cp a, 0 jp nz, InitializeSRAM ld a, [rCheck+5] - cp a, 0 + cp a, 1 jp nz, InitializeSRAM ; SRAM is initialized and for this build, so we can load the data. @@ -232,7 +220,7 @@ InitializeSRAM: ld [rCheck+3], a ld a, 0 ld [rCheck+4], a - ld a, 0 + ld a, 1 ld [rCheck+5], a xor a, a @@ -297,16 +285,58 @@ InitializeSRAM: ld de, rProfileData ld bc, 64 call UnsafeMemCopy + ld hl, rProfileData3 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + ld hl, rProfileData4 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + ld hl, rProfileData5 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + ld hl, rProfileData6 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + ld hl, rProfileData7 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + ld hl, rProfileData8 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + ld hl, rProfileData9 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy ld a, "1" ld [rProfileName1+2], a ld a, "2" ld [rProfileName2+2], a + ld a, "3" + ld [rProfileName3+2], a + ld a, "4" + ld [rProfileName4+2], a + ld a, "5" + ld [rProfileName5+2], a + ld a, "6" + ld [rProfileName6+2], a + ld a, "7" + ld [rProfileName7+2], a + ld a, "8" + ld [rProfileName8+2], a + ld a, "9" + ld [rProfileName9+2], a ret NextProfile:: ld a, [rLastProfile] inc a - cp a, 3 + cp a, 10 jr nz, .update xor a, a .update @@ -323,6 +353,20 @@ ChangeProfile:: jr z, .second cp a, 2 jr z, .third + cp a, 3 + jr z, .fourth + cp a, 4 + jr z, .fifth + cp a, 5 + jr z, .sixth + cp a, 6 + jr z, .seventh + cp a, 7 + jr z, .eighth + cp a, 8 + jr z, .ninth + cp a, 9 + jr z, .tenth ret .first @@ -346,6 +390,55 @@ ChangeProfile:: call UnsafeMemCopy jr .restore +.fourth + ld hl, rProfileData3 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + jr .restore + +.fifth + ld hl, rProfileData4 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + jr .restore + +.sixth + ld hl, rProfileData5 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + jr .restore + +.seventh + ld hl, rProfileData6 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + jr .restore + +.eighth + ld hl, rProfileData7 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + jr .restore + +.ninth + ld hl, rProfileData8 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + jr .restore + +.tenth + ld hl, rProfileData9 + ld de, rProfileData + ld bc, 64 + call UnsafeMemCopy + jr .restore + .restore ld a, [wTarget] ld [rLastProfile], a @@ -355,6 +448,20 @@ ChangeProfile:: jr z, .lsecond cp a, 2 jr z, .lthird + cp a, 3 + jr z, .lfourth + cp a, 4 + jr z, .lfifth + cp a, 5 + jr z, .lsixth + cp a, 6 + jr z, .lseventh + cp a, 7 + jr z, .leighth + cp a, 8 + jr z, .lninth + cp a, 9 + jp z, .ltenth ret .lfirst @@ -378,5 +485,54 @@ ChangeProfile:: call UnsafeMemCopy jp TrustedLoad +.lfourth + ld hl, rProfileData + ld de, rProfileData3 + ld bc, 64 + call UnsafeMemCopy + jp TrustedLoad + +.lfifth + ld hl, rProfileData + ld de, rProfileData4 + ld bc, 64 + call UnsafeMemCopy + jp TrustedLoad + +.lsixth + ld hl, rProfileData + ld de, rProfileData5 + ld bc, 64 + call UnsafeMemCopy + jp TrustedLoad + +.lseventh + ld hl, rProfileData + ld de, rProfileData6 + ld bc, 64 + call UnsafeMemCopy + jp TrustedLoad + +.leighth + ld hl, rProfileData + ld de, rProfileData7 + ld bc, 64 + call UnsafeMemCopy + jp TrustedLoad + +.lninth + ld hl, rProfileData + ld de, rProfileData8 + ld bc, 64 + call UnsafeMemCopy + jp TrustedLoad + +.ltenth + ld hl, rProfileData + ld de, rProfileData9 + ld bc, 64 + call UnsafeMemCopy + jp TrustedLoad + ENDC