Add profile switching.

This commit is contained in:
Randy Thiemann 2023-11-10 10:55:04 +01:00
parent 79411d2992
commit c4805e9c79
6 changed files with 513 additions and 490 deletions

Binary file not shown.

View File

@ -366,146 +366,149 @@ ROM0 bank #0:
$2bb3 = Next7Piece $2bb3 = Next7Piece
$2bb3 = !20 $2bb3 = !20
$2bbd = NextByte $2bbd = NextByte
SECTION: $2bdd-$2df1 ($0215 bytes) ["SRAM Functions"] SECTION: $2bdd-$2e06 ($022a bytes) ["SRAM Functions"]
$2bdd = RestoreSRAM $2bdd = RestoreSRAM
$2c5f = RestoreSRAM.jumps $2c0d = TrustedLoad
$2c77 = RestoreSRAM.dmgt $2c5f = TrustedLoad.jumps
$2c7d = RestoreSRAM.tgm1 $2c77 = TrustedLoad.dmgt
$2c83 = RestoreSRAM.tgm3 $2c7d = TrustedLoad.tgm1
$2c89 = RestoreSRAM.deat $2c83 = TrustedLoad.tgm3
$2c8f = RestoreSRAM.shir $2c89 = TrustedLoad.deat
$2c95 = RestoreSRAM.chil $2c8f = TrustedLoad.shir
$2c9b = RestoreSRAM.myco $2c95 = TrustedLoad.chil
$2ca1 = RestoreSRAM.search $2c9b = TrustedLoad.myco
$2cb3 = RestoreSRAM.notfound $2ca1 = TrustedLoad.search
$2cba = RestoreSRAM.fallback $2cb3 = TrustedLoad.notfound
$2cba = TrustedLoad.fallback
$2cd5 = InitializeSRAM $2cd5 = InitializeSRAM
$2d7e = ChangeProfile $2d7e = NextProfile
$2d7e = ChangeProfile.backup $2d87 = NextProfile.update
$2d91 = ChangeProfile.first $2d8a = ChangeProfile
$2d9f = ChangeProfile.second $2d8a = ChangeProfile.backup
$2dad = ChangeProfile.third $2d9d = ChangeProfile.first
$2dbb = ChangeProfile.restore $2dab = ChangeProfile.second
$2dce = ChangeProfile.lfirst $2db9 = ChangeProfile.third
$2dda = ChangeProfile.lsecond $2dc7 = ChangeProfile.restore
$2de6 = ChangeProfile.lthird $2dda = ChangeProfile.lfirst
SECTION: $2df2-$2f3b ($014a bytes) ["Progress Data"] $2de9 = ChangeProfile.lsecond
$2df2 = sProgressData $2df8 = ChangeProfile.lthird
SECTION: $2f3c-$301b ($00e0 bytes) ["Score Functions"] SECTION: $2e07-$2f50 ($014a bytes) ["Progress Data"]
$2f3c = ScoreInit $2e07 = sProgressData
$2f64 = IncreaseScore SECTION: $2f51-$3030 ($00e0 bytes) ["Score Functions"]
$2f9c = IncreaseScore.doConvert $2f51 = ScoreInit
$2f9e = !0 $2f79 = IncreaseScore
$2fb4 = IncreaseScore.carry $2fb1 = IncreaseScore.doConvert
$2fb6 = IncreaseScore.postConvert $2fb3 = !0
$2fc3 = !1 $2fc9 = IncreaseScore.carry
$2fca = IncreaseScore.preAddDigit $2fcb = IncreaseScore.postConvert
$2ff2 = IncreaseScore.addDigit $2fd8 = !1
$3008 = IncreaseScore.nextDigit $2fdf = IncreaseScore.preAddDigit
SECTION: $301c-$30e8 ($00cd bytes) ["Input Functions"] $3007 = IncreaseScore.addDigit
$301c = InputInit $301d = IncreaseScore.nextDigit
$302e = GetInput SECTION: $3031-$30fd ($00cd bytes) ["Input Functions"]
$302e = GetInput.btns $3031 = InputInit
$303b = GetInput.readA $3043 = GetInput
$303f = GetInput.setA $3043 = GetInput.btns
$304a = GetInput.clearA $3050 = GetInput.readA
$304d = GetInput.readB $3054 = GetInput.setA
$3051 = GetInput.setB $305f = GetInput.clearA
$305c = GetInput.clearB $3062 = GetInput.readB
$305f = GetInput.readSelect $3066 = GetInput.setB
$3063 = GetInput.setSelect $3071 = GetInput.clearB
$306e = GetInput.clearSelect $3074 = GetInput.readSelect
$3071 = GetInput.readStart $3078 = GetInput.setSelect
$3075 = GetInput.setStart $3083 = GetInput.clearSelect
$3080 = GetInput.clearStart $3086 = GetInput.readStart
$3083 = GetInput.dpad $308a = GetInput.setStart
$3090 = GetInput.readUp $3095 = GetInput.clearStart
$3094 = GetInput.setUp $3098 = GetInput.dpad
$309f = GetInput.clearUp $30a5 = GetInput.readUp
$30a2 = GetInput.readDown $30a9 = GetInput.setUp
$30a6 = GetInput.setDown $30b4 = GetInput.clearUp
$30b1 = GetInput.clearDown $30b7 = GetInput.readDown
$30b4 = GetInput.readLeft $30bb = GetInput.setDown
$30b8 = GetInput.setLeft $30c6 = GetInput.clearDown
$30c3 = GetInput.clearLeft $30c9 = GetInput.readLeft
$30c6 = GetInput.readRight $30cd = GetInput.setLeft
$30ca = GetInput.setRight $30d8 = GetInput.clearLeft
$30d5 = GetInput.clearRight $30db = GetInput.readRight
$30d8 = GetInput.priorities $30df = GetInput.setRight
$30e3 = GetInput.zero $30ea = GetInput.clearRight
SECTION: $30e9-$31b3 ($00cb bytes) ["Title Function Trampolines"] $30ed = GetInput.priorities
$30e9 = SwitchToTitle $30f8 = GetInput.zero
$30f2 = TitleEventLoopHandler SECTION: $30fe-$31c8 ($00cb bytes) ["Title Function Trampolines"]
$30fc = TitleVBlankHandler $30fe = SwitchToTitle
$3106 = PersistLevel $3107 = TitleEventLoopHandler
$3114 = DrawSpeedMain $3111 = TitleVBlankHandler
$3164 = DrawSpeedSettings $311b = PersistLevel
SECTION: $31b4-$3279 ($00c6 bytes) ["Time Functions"] $3129 = DrawSpeedMain
$31b4 = TimeInit $3179 = DrawSpeedSettings
$31d4 = StartCountdown SECTION: $31c9-$328e ($00c6 bytes) ["Time Functions"]
$31e2 = ResetGameTime $31c9 = TimeInit
$31ed = CheckTorikan $31e9 = StartCountdown
$3204 = CheckTorikan.failure $31f7 = ResetGameTime
$3206 = CheckTorikan.success $3202 = CheckTorikan
$3209 = HandleTimers $3219 = CheckTorikan.failure
$322f = HandleTimers.reduce $321b = CheckTorikan.success
$323c = HandleTimers.clock $321e = HandleTimers
$3256 = HandleTimers.go $3244 = HandleTimers.reduce
SECTION: $327a-$332b ($00b2 bytes) ["Progress Functions"] $3251 = HandleTimers.clock
$327a = SetProgress $326b = HandleTimers.go
$3285 = SetProgress.loop SECTION: $328f-$3340 ($00b2 bytes) ["Progress Functions"]
$3289 = SetProgress.correct $328f = SetProgress
$32b0 = SetProgress.wvr_u1 $329a = SetProgress.loop
$32bc = SetProgress.wvr_u2 $329e = SetProgress.correct
$32ca = SetProgress.wvr_u3 $32c5 = SetProgress.wvr_u1
$32d6 = SetProgress.wvr_u4 $32d1 = SetProgress.wvr_u2
$32e4 = SetProgress.wvr_u5 $32df = SetProgress.wvr_u3
$32f0 = SetProgress.wvr_u6 $32eb = SetProgress.wvr_u4
$32fe = SetProgress.wvr_u7 $32f9 = SetProgress.wvr_u5
$330a = SetProgress.wvr_u8 $3305 = SetProgress.wvr_u6
$3318 = SetProgress.wvr_u9 $3313 = SetProgress.wvr_u7
$3324 = SetProgress.wvr_u10 $331f = SetProgress.wvr_u8
SECTION: $332c-$33bd ($0092 bytes) ["Code Entry Point"] $332d = SetProgress.wvr_u9
$332c = Main $3339 = SetProgress.wvr_u10
$3355 = Main.notgbc SECTION: $3341-$33d2 ($0092 bytes) ["Code Entry Point"]
$335b = Main.wvr_u1 $3341 = Main
$3382 = EventLoop $336a = Main.notgbc
$3398 = EventLoop.eventloopjumps $3370 = Main.wvr_u1
$33a1 = EventLoopPostHandler $3397 = EventLoop
$33a3 = EventLoopPostHandler.wvb_u2 $33ad = EventLoop.eventloopjumps
$33b5 = EventLoopPostHandler.vblankjumps $33b6 = EventLoopPostHandler
SECTION: $33be-$340f ($0052 bytes) ["Tile Functions"] $33b8 = EventLoopPostHandler.wvb_u2
$33be = LoadTitleTiles $33ca = EventLoopPostHandler.vblankjumps
$33dc = LoadGameplayTiles SECTION: $33d3-$3424 ($0052 bytes) ["Tile Functions"]
$33f2 = LoadGameplayTiles.gbc $33d3 = LoadTitleTiles
$3401 = LoadGameplayTiles.dmg $33f1 = LoadGameplayTiles
SECTION: $3410-$344b ($003c bytes) ["Time Data"] $3407 = LoadGameplayTiles.gbc
$3410 = sFramesToCS $3416 = LoadGameplayTiles.dmg
SECTION: $344c-$3479 ($002e bytes) ["Memory Functions"] SECTION: $3425-$3460 ($003c bytes) ["Time Data"]
$344c = UnsafeMemCopy $3425 = sFramesToCS
$3455 = SafeMemCopy.wvr_u1 SECTION: $3461-$348e ($002e bytes) ["Memory Functions"]
$3455 = SafeMemCopy $3461 = UnsafeMemCopy
$3464 = UnsafeMemSet $346a = SafeMemCopy.wvr_u1
$346c = SafeMemSet $346a = SafeMemCopy
$346c = SafeMemSet.wvr_u2 $3479 = UnsafeMemSet
SECTION: $347a-$349f ($0026 bytes) ["Gameplay Function Trampolines"] $3481 = SafeMemSet
$347a = SwitchToGameplay $3481 = SafeMemSet.wvr_u2
$3483 = SwitchToGameplayBig SECTION: $348f-$34b4 ($0026 bytes) ["Gameplay Function Trampolines"]
$348c = GamePlayEventLoopHandler $348f = SwitchToGameplay
$3496 = GamePlayBigEventLoopHandler $3498 = SwitchToGameplayBig
SECTION: $34a0-$34c4 ($0025 bytes) ["Interrupt Initialization Functions"] $34a1 = GamePlayEventLoopHandler
$34a0 = EnableScreenSquish $34ab = GamePlayBigEventLoopHandler
$34ba = DisableScreenSquish SECTION: $34b5-$34d9 ($0025 bytes) ["Interrupt Initialization Functions"]
SECTION: $34c5-$34e6 ($0022 bytes) ["OAM Functions"] $34b5 = EnableScreenSquish
$34c5 = CopyOAMHandler $34cf = DisableScreenSquish
$34d1 = ClearOAM SECTION: $34da-$34fb ($0022 bytes) ["OAM Functions"]
SECTION: $34e7-$34f5 ($000f bytes) ["Banking Functions"] $34da = CopyOAMHandler
$34e7 = BankingInit $34e6 = ClearOAM
SECTION: $34f6-$34ff ($000a bytes) ["OAM DMA Code"] SECTION: $34fc-$350a ($000f bytes) ["Banking Functions"]
$34f6 = OAMDMA $34fc = BankingInit
$3500 = OAMDMAEnd SECTION: $350b-$3514 ($000a bytes) ["OAM DMA Code"]
EMPTY: $3500-$3fff ($0b00 bytes) $350b = OAMDMA
TOTAL EMPTY: $0b0b bytes $3515 = OAMDMAEnd
EMPTY: $3515-$3fff ($0aeb bytes)
TOTAL EMPTY: $0af6 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"]
@ -636,7 +639,7 @@ ROMX bank #4:
$47f0 = sTitleScreenCreditsMap $47f0 = sTitleScreenCreditsMap
$47f0 = sTitleScreenSettingsMapEnd $47f0 = sTitleScreenSettingsMapEnd
$4a90 = sTitleScreenCreditsMapEnd $4a90 = sTitleScreenCreditsMapEnd
SECTION: $4a90-$5232 ($07a3 bytes) ["Title Functions Banked"] SECTION: $4a90-$5239 ($07aa bytes) ["Title Functions Banked"]
$4a90 = SwitchToTitleB $4a90 = SwitchToTitleB
$4a96 = SwitchToTitleB.wvr_u1 $4a96 = SwitchToTitleB.wvr_u1
$4a9f = !0 $4a9f = !0
@ -658,134 +661,134 @@ ROMX bank #4:
$4bd3 = TitleEventLoopHandlerB $4bd3 = TitleEventLoopHandlerB
$4be1 = TitleEventLoopHandlerB.jumps $4be1 = TitleEventLoopHandlerB.jumps
$4bf0 = TitleEventLoopHandlerB.eventLoopMain $4bf0 = TitleEventLoopHandlerB.eventLoopMain
$4c13 = TitleEventLoopHandlerB.d0 $4c1a = TitleEventLoopHandlerB.d0
$4c27 = TitleEventLoopHandlerB.eventLoopProfile $4c2e = TitleEventLoopHandlerB.eventLoopProfile
$4c28 = TitleEventLoopHandlerB.eventLoopSettings $4c2f = TitleEventLoopHandlerB.eventLoopSettings
$4c52 = TitleEventLoopHandlerB.d1 $4c59 = TitleEventLoopHandlerB.d1
$4c67 = TitleEventLoopHandlerB.l1 $4c6e = TitleEventLoopHandlerB.l1
$4c7c = TitleEventLoopHandlerB.r1 $4c83 = TitleEventLoopHandlerB.r1
$4c90 = TitleEventLoopHandlerB.eventLoopRecords $4c97 = TitleEventLoopHandlerB.eventLoopRecords
$4c91 = TitleEventLoopHandlerB.eventLoopCredits $4c98 = TitleEventLoopHandlerB.eventLoopCredits
$4ca7 = TitleEventLoopHandlerB.quitcredits $4cae = TitleEventLoopHandlerB.quitcredits
$4cac = TitleVBlankHandlerB $4cb3 = TitleVBlankHandlerB
$4cba = TitleVBlankHandlerB.jumps $4cc1 = TitleVBlankHandlerB.jumps
$4cc9 = TitleVBlankHandlerB.vblankMain $4cd0 = TitleVBlankHandlerB.vblankMain
$4cd3 = TitleVBlankHandlerB.notselected_u5 $4cda = TitleVBlankHandlerB.notselected_u5
$4cd8 = TitleVBlankHandlerB.selected_u5 $4cdf = TitleVBlankHandlerB.selected_u5
$4cdb = TitleVBlankHandlerB.done_u5 $4ce2 = TitleVBlankHandlerB.done_u5
$4ce5 = TitleVBlankHandlerB.notselected_u6 $4cec = TitleVBlankHandlerB.notselected_u6
$4cea = TitleVBlankHandlerB.selected_u6 $4cf1 = TitleVBlankHandlerB.selected_u6
$4ced = TitleVBlankHandlerB.done_u6 $4cf4 = TitleVBlankHandlerB.done_u6
$4cf7 = TitleVBlankHandlerB.notselected_u7 $4cfe = TitleVBlankHandlerB.notselected_u7
$4cfc = TitleVBlankHandlerB.selected_u7 $4d03 = TitleVBlankHandlerB.selected_u7
$4cff = TitleVBlankHandlerB.done_u7 $4d06 = TitleVBlankHandlerB.done_u7
$4d09 = TitleVBlankHandlerB.notselected_u8 $4d10 = TitleVBlankHandlerB.notselected_u8
$4d0e = TitleVBlankHandlerB.selected_u8 $4d15 = TitleVBlankHandlerB.selected_u8
$4d11 = TitleVBlankHandlerB.done_u8 $4d18 = TitleVBlankHandlerB.done_u8
$4d1b = TitleVBlankHandlerB.notselected_u9 $4d22 = TitleVBlankHandlerB.notselected_u9
$4d20 = TitleVBlankHandlerB.selected_u9 $4d27 = TitleVBlankHandlerB.selected_u9
$4d23 = TitleVBlankHandlerB.done_u9 $4d2a = TitleVBlankHandlerB.done_u9
$4d2d = TitleVBlankHandlerB.notselected_u10 $4d34 = TitleVBlankHandlerB.notselected_u10
$4d32 = TitleVBlankHandlerB.selected_u10 $4d39 = TitleVBlankHandlerB.selected_u10
$4d35 = TitleVBlankHandlerB.done_u10 $4d3c = TitleVBlankHandlerB.done_u10
$4dbf = TitleVBlankHandlerB.disabled $4dc6 = TitleVBlankHandlerB.disabled
$4dcb = TitleVBlankHandlerB.profile $4dd2 = TitleVBlankHandlerB.profile
$4dda = TitleVBlankHandlerB.vblankProfile $4de1 = TitleVBlankHandlerB.vblankProfile
$4ddb = TitleVBlankHandlerB.vblankSettings $4de2 = TitleVBlankHandlerB.vblankSettings
$4de5 = TitleVBlankHandlerB.notselected_u11 $4dec = TitleVBlankHandlerB.notselected_u11
$4dea = TitleVBlankHandlerB.selected_u11 $4df1 = TitleVBlankHandlerB.selected_u11
$4ded = TitleVBlankHandlerB.done_u11 $4df4 = TitleVBlankHandlerB.done_u11
$4df7 = TitleVBlankHandlerB.notselected_u12 $4dfe = TitleVBlankHandlerB.notselected_u12
$4dfc = TitleVBlankHandlerB.selected_u12 $4e03 = TitleVBlankHandlerB.selected_u12
$4dff = TitleVBlankHandlerB.done_u12 $4e06 = TitleVBlankHandlerB.done_u12
$4e09 = TitleVBlankHandlerB.notselected_u13 $4e10 = TitleVBlankHandlerB.notselected_u13
$4e0e = TitleVBlankHandlerB.selected_u13 $4e15 = TitleVBlankHandlerB.selected_u13
$4e11 = TitleVBlankHandlerB.done_u13 $4e18 = TitleVBlankHandlerB.done_u13
$4e1b = TitleVBlankHandlerB.notselected_u14 $4e22 = TitleVBlankHandlerB.notselected_u14
$4e20 = TitleVBlankHandlerB.selected_u14 $4e27 = TitleVBlankHandlerB.selected_u14
$4e23 = TitleVBlankHandlerB.done_u14 $4e2a = TitleVBlankHandlerB.done_u14
$4e2d = TitleVBlankHandlerB.notselected_u15 $4e34 = TitleVBlankHandlerB.notselected_u15
$4e32 = TitleVBlankHandlerB.selected_u15 $4e39 = TitleVBlankHandlerB.selected_u15
$4e35 = TitleVBlankHandlerB.done_u15 $4e3c = TitleVBlankHandlerB.done_u15
$4e3f = TitleVBlankHandlerB.notselected_u16 $4e46 = TitleVBlankHandlerB.notselected_u16
$4e44 = TitleVBlankHandlerB.selected_u16 $4e4b = TitleVBlankHandlerB.selected_u16
$4e47 = TitleVBlankHandlerB.done_u16 $4e4e = TitleVBlankHandlerB.done_u16
$4e51 = TitleVBlankHandlerB.notselected_u17 $4e58 = TitleVBlankHandlerB.notselected_u17
$4e56 = TitleVBlankHandlerB.selected_u17 $4e5d = TitleVBlankHandlerB.selected_u17
$4e59 = TitleVBlankHandlerB.done_u17 $4e60 = TitleVBlankHandlerB.done_u17
$4e63 = TitleVBlankHandlerB.notselected_u18 $4e6a = TitleVBlankHandlerB.notselected_u18
$4e68 = TitleVBlankHandlerB.selected_u18 $4e6f = TitleVBlankHandlerB.selected_u18
$4e6b = TitleVBlankHandlerB.done_u18 $4e72 = TitleVBlankHandlerB.done_u18
$4ef5 = TitleVBlankHandlerB.disabled1 $4efc = TitleVBlankHandlerB.disabled1
$4f01 = TitleVBlankHandlerB.buttons $4f08 = TitleVBlankHandlerB.buttons
$4f26 = !2 $4f2d = !2
$4f2e = TitleVBlankHandlerB.donetetry $4f35 = TitleVBlankHandlerB.donetetry
$4f54 = TitleVBlankHandlerB.vblankRecords $4f5b = TitleVBlankHandlerB.vblankRecords
$4f55 = TitleVBlankHandlerB.vblankCredits $4f5c = TitleVBlankHandlerB.vblankCredits
$4f56 = MainHandleA $4f5d = MainHandleA
$4f64 = MainHandleA.jumps $4f6b = MainHandleA.jumps
$4f76 = MainHandleA.tosettings $4f7d = MainHandleA.tosettings
$4f7b = MainHandleA.tocredits $4f82 = MainHandleA.tocredits
$4f80 = MainHandleUp $4f87 = MainHandleUp
$4f8c = !3 $4f93 = !3
$4f92 = MainHandleDown $4f99 = MainHandleDown
$4f9e = !4 $4fa5 = !4
$4fa3 = SettingsHandleA $4faa = SettingsHandleA
$4fb0 = SettingsHandleB $4fb7 = SettingsHandleB
$4fb5 = SettingsHandleDown $4fbc = SettingsHandleDown
$4fc1 = !5 $4fc8 = !5
$4fc6 = SettingsHandleUp $4fcd = SettingsHandleUp
$4fd2 = !6 $4fd9 = !6
$4fd8 = SettingsHandleLeft $4fdf = SettingsHandleLeft
$4fe9 = SettingsHandleLeft.jumps $4ff0 = SettingsHandleLeft.jumps
$5001 = SettingsHandleLeft.buttons $5008 = SettingsHandleLeft.buttons
$5010 = !7 $5017 = !7
$5019 = SettingsHandleLeft.rng $5020 = SettingsHandleLeft.rng
$5028 = !8 $502f = !8
$5031 = SettingsHandleLeft.rot $5038 = SettingsHandleLeft.rot
$5040 = !9 $5047 = !9
$5049 = SettingsHandleLeft.drop $5050 = SettingsHandleLeft.drop
$5058 = !10 $505f = !10
$5061 = SettingsHandleLeft.curve $5068 = SettingsHandleLeft.curve
$5073 = !11 $507a = !11
$507f = SettingsHandleLeft.hig $5086 = SettingsHandleLeft.hig
$508e = !12 $5095 = !12
$5097 = SettingsHandleRight $509e = SettingsHandleRight
$50a8 = SettingsHandleRight.jumps $50af = SettingsHandleRight.jumps
$50c0 = SettingsHandleRight.buttons $50c7 = SettingsHandleRight.buttons
$50cf = !13 $50d6 = !13
$50d7 = SettingsHandleRight.rng $50de = SettingsHandleRight.rng
$50e6 = !14 $50ed = !14
$50ee = SettingsHandleRight.rot $50f5 = SettingsHandleRight.rot
$50fd = !15 $5104 = !15
$5105 = SettingsHandleRight.drop $510c = SettingsHandleRight.drop
$5114 = !16 $511b = !16
$511c = SettingsHandleRight.curve $5123 = SettingsHandleRight.curve
$512e = !17 $5135 = !17
$5139 = SettingsHandleRight.hig $5140 = SettingsHandleRight.hig
$5148 = !18 $514f = !18
$5150 = DecrementLevel $5157 = DecrementLevel
$5166 = IncrementLevel $516d = IncrementLevel
$517c = InitSpeedCurve $5183 = InitSpeedCurve
$518b = GetEnd $5192 = GetEnd
$5196 = !19 $519d = !19
$519e = !20 $51a5 = !20
$51a6 = !21 $51ad = !21
$51ae = !22 $51b5 = !22
$51b6 = !23 $51bd = !23
$51be = !24 $51c5 = !24
$51c2 = GetStart $51c9 = GetStart
$51cd = !25 $51d4 = !25
$51d5 = !26 $51dc = !26
$51dd = !27 $51e4 = !27
$51e5 = !28 $51ec = !28
$51ed = !29 $51f4 = !29
$51f5 = !30 $51fc = !30
$51f9 = CheckLevelRange $5200 = CheckLevelRange
$5212 = CheckLevelRange.notatend $5219 = CheckLevelRange.notatend
$5232 = CheckLevelRange.notatstart $5239 = CheckLevelRange.notatstart
EMPTY: $5233-$7fff ($2dcd bytes) EMPTY: $523a-$7fff ($2dc6 bytes)
TOTAL EMPTY: $2dcd bytes TOTAL EMPTY: $2dc6 bytes
ROMX bank #5: ROMX bank #5:
SECTION: $4000-$4007 ($0008 bytes) ["Bank ID BANK_GAMEPLAY"] SECTION: $4000-$4007 ($0008 bytes) ["Bank ID BANK_GAMEPLAY"]
@ -2727,8 +2730,8 @@ HRAM bank #0:
TOTAL EMPTY: $0003 bytes TOTAL EMPTY: $0003 bytes
SUMMARY: SUMMARY:
ROM0: 13557 bytes used / 2827 free ROM0: 13578 bytes used / 2806 free
ROMX: 62755 bytes used / 35549 free in 6 banks ROMX: 62762 bytes used / 35542 free in 6 banks
SRAM: 263 bytes used / 7929 free in 1 bank SRAM: 263 bytes used / 7929 free in 1 bank
WRAM0: 3545 bytes used / 551 free WRAM0: 3545 bytes used / 551 free
HRAM: 124 bytes used / 3 free HRAM: 124 bytes used / 3 free

Binary file not shown.

View File

@ -271,125 +271,128 @@
00:2bb3 Next7Piece 00:2bb3 Next7Piece
00:2bbd NextByte 00:2bbd NextByte
00:2bdd RestoreSRAM 00:2bdd RestoreSRAM
00:2c5f RestoreSRAM.jumps 00:2c0d TrustedLoad
00:2c77 RestoreSRAM.dmgt 00:2c5f TrustedLoad.jumps
00:2c7d RestoreSRAM.tgm1 00:2c77 TrustedLoad.dmgt
00:2c83 RestoreSRAM.tgm3 00:2c7d TrustedLoad.tgm1
00:2c89 RestoreSRAM.deat 00:2c83 TrustedLoad.tgm3
00:2c8f RestoreSRAM.shir 00:2c89 TrustedLoad.deat
00:2c95 RestoreSRAM.chil 00:2c8f TrustedLoad.shir
00:2c9b RestoreSRAM.myco 00:2c95 TrustedLoad.chil
00:2ca1 RestoreSRAM.search 00:2c9b TrustedLoad.myco
00:2cb3 RestoreSRAM.notfound 00:2ca1 TrustedLoad.search
00:2cba RestoreSRAM.fallback 00:2cb3 TrustedLoad.notfound
00:2cba TrustedLoad.fallback
00:2cd5 InitializeSRAM 00:2cd5 InitializeSRAM
00:2d7e ChangeProfile 00:2d7e NextProfile
00:2d7e ChangeProfile.backup 00:2d87 NextProfile.update
00:2d91 ChangeProfile.first 00:2d8a ChangeProfile
00:2d9f ChangeProfile.second 00:2d8a ChangeProfile.backup
00:2dad ChangeProfile.third 00:2d9d ChangeProfile.first
00:2dbb ChangeProfile.restore 00:2dab ChangeProfile.second
00:2dce ChangeProfile.lfirst 00:2db9 ChangeProfile.third
00:2dda ChangeProfile.lsecond 00:2dc7 ChangeProfile.restore
00:2de6 ChangeProfile.lthird 00:2dda ChangeProfile.lfirst
00:2df2 sProgressData 00:2de9 ChangeProfile.lsecond
00:2f3c ScoreInit 00:2df8 ChangeProfile.lthird
00:2f64 IncreaseScore 00:2e07 sProgressData
00:2f9c IncreaseScore.doConvert 00:2f51 ScoreInit
00:2fb4 IncreaseScore.carry 00:2f79 IncreaseScore
00:2fb6 IncreaseScore.postConvert 00:2fb1 IncreaseScore.doConvert
00:2fca IncreaseScore.preAddDigit 00:2fc9 IncreaseScore.carry
00:2ff2 IncreaseScore.addDigit 00:2fcb IncreaseScore.postConvert
00:3008 IncreaseScore.nextDigit 00:2fdf IncreaseScore.preAddDigit
00:301c InputInit 00:3007 IncreaseScore.addDigit
00:302e GetInput 00:301d IncreaseScore.nextDigit
00:302e GetInput.btns 00:3031 InputInit
00:303b GetInput.readA 00:3043 GetInput
00:303f GetInput.setA 00:3043 GetInput.btns
00:304a GetInput.clearA 00:3050 GetInput.readA
00:304d GetInput.readB 00:3054 GetInput.setA
00:3051 GetInput.setB 00:305f GetInput.clearA
00:305c GetInput.clearB 00:3062 GetInput.readB
00:305f GetInput.readSelect 00:3066 GetInput.setB
00:3063 GetInput.setSelect 00:3071 GetInput.clearB
00:306e GetInput.clearSelect 00:3074 GetInput.readSelect
00:3071 GetInput.readStart 00:3078 GetInput.setSelect
00:3075 GetInput.setStart 00:3083 GetInput.clearSelect
00:3080 GetInput.clearStart 00:3086 GetInput.readStart
00:3083 GetInput.dpad 00:308a GetInput.setStart
00:3090 GetInput.readUp 00:3095 GetInput.clearStart
00:3094 GetInput.setUp 00:3098 GetInput.dpad
00:309f GetInput.clearUp 00:30a5 GetInput.readUp
00:30a2 GetInput.readDown 00:30a9 GetInput.setUp
00:30a6 GetInput.setDown 00:30b4 GetInput.clearUp
00:30b1 GetInput.clearDown 00:30b7 GetInput.readDown
00:30b4 GetInput.readLeft 00:30bb GetInput.setDown
00:30b8 GetInput.setLeft 00:30c6 GetInput.clearDown
00:30c3 GetInput.clearLeft 00:30c9 GetInput.readLeft
00:30c6 GetInput.readRight 00:30cd GetInput.setLeft
00:30ca GetInput.setRight 00:30d8 GetInput.clearLeft
00:30d5 GetInput.clearRight 00:30db GetInput.readRight
00:30d8 GetInput.priorities 00:30df GetInput.setRight
00:30e3 GetInput.zero 00:30ea GetInput.clearRight
00:30e9 SwitchToTitle 00:30ed GetInput.priorities
00:30f2 TitleEventLoopHandler 00:30f8 GetInput.zero
00:30fc TitleVBlankHandler 00:30fe SwitchToTitle
00:3106 PersistLevel 00:3107 TitleEventLoopHandler
00:3114 DrawSpeedMain 00:3111 TitleVBlankHandler
00:3164 DrawSpeedSettings 00:311b PersistLevel
00:31b4 TimeInit 00:3129 DrawSpeedMain
00:31d4 StartCountdown 00:3179 DrawSpeedSettings
00:31e2 ResetGameTime 00:31c9 TimeInit
00:31ed CheckTorikan 00:31e9 StartCountdown
00:3204 CheckTorikan.failure 00:31f7 ResetGameTime
00:3206 CheckTorikan.success 00:3202 CheckTorikan
00:3209 HandleTimers 00:3219 CheckTorikan.failure
00:322f HandleTimers.reduce 00:321b CheckTorikan.success
00:323c HandleTimers.clock 00:321e HandleTimers
00:3256 HandleTimers.go 00:3244 HandleTimers.reduce
00:327a SetProgress 00:3251 HandleTimers.clock
00:3285 SetProgress.loop 00:326b HandleTimers.go
00:3289 SetProgress.correct 00:328f SetProgress
00:32b0 SetProgress.wvr_u1 00:329a SetProgress.loop
00:32bc SetProgress.wvr_u2 00:329e SetProgress.correct
00:32ca SetProgress.wvr_u3 00:32c5 SetProgress.wvr_u1
00:32d6 SetProgress.wvr_u4 00:32d1 SetProgress.wvr_u2
00:32e4 SetProgress.wvr_u5 00:32df SetProgress.wvr_u3
00:32f0 SetProgress.wvr_u6 00:32eb SetProgress.wvr_u4
00:32fe SetProgress.wvr_u7 00:32f9 SetProgress.wvr_u5
00:330a SetProgress.wvr_u8 00:3305 SetProgress.wvr_u6
00:3318 SetProgress.wvr_u9 00:3313 SetProgress.wvr_u7
00:3324 SetProgress.wvr_u10 00:331f SetProgress.wvr_u8
00:332c Main 00:332d SetProgress.wvr_u9
00:3355 Main.notgbc 00:3339 SetProgress.wvr_u10
00:335b Main.wvr_u1 00:3341 Main
00:3382 EventLoop 00:336a Main.notgbc
00:3398 EventLoop.eventloopjumps 00:3370 Main.wvr_u1
00:33a1 EventLoopPostHandler 00:3397 EventLoop
00:33a3 EventLoopPostHandler.wvb_u2 00:33ad EventLoop.eventloopjumps
00:33b5 EventLoopPostHandler.vblankjumps 00:33b6 EventLoopPostHandler
00:33be LoadTitleTiles 00:33b8 EventLoopPostHandler.wvb_u2
00:33dc LoadGameplayTiles 00:33ca EventLoopPostHandler.vblankjumps
00:33f2 LoadGameplayTiles.gbc 00:33d3 LoadTitleTiles
00:3401 LoadGameplayTiles.dmg 00:33f1 LoadGameplayTiles
00:3410 sFramesToCS 00:3407 LoadGameplayTiles.gbc
00:344c UnsafeMemCopy 00:3416 LoadGameplayTiles.dmg
00:3455 SafeMemCopy.wvr_u1 00:3425 sFramesToCS
00:3455 SafeMemCopy 00:3461 UnsafeMemCopy
00:3464 UnsafeMemSet 00:346a SafeMemCopy.wvr_u1
00:346c SafeMemSet 00:346a SafeMemCopy
00:346c SafeMemSet.wvr_u2 00:3479 UnsafeMemSet
00:347a SwitchToGameplay 00:3481 SafeMemSet
00:3483 SwitchToGameplayBig 00:3481 SafeMemSet.wvr_u2
00:348c GamePlayEventLoopHandler 00:348f SwitchToGameplay
00:3496 GamePlayBigEventLoopHandler 00:3498 SwitchToGameplayBig
00:34a0 EnableScreenSquish 00:34a1 GamePlayEventLoopHandler
00:34ba DisableScreenSquish 00:34ab GamePlayBigEventLoopHandler
00:34c5 CopyOAMHandler 00:34b5 EnableScreenSquish
00:34d1 ClearOAM 00:34cf DisableScreenSquish
00:34e7 BankingInit 00:34da CopyOAMHandler
00:34f6 OAMDMA 00:34e6 ClearOAM
00:3500 OAMDMAEnd 00:34fc BankingInit
00:350b OAMDMA
00:3515 OAMDMAEnd
01:4008 sDMGTSpeedCurve 01:4008 sDMGTSpeedCurve
01:4203 sDMGTSpeedCurveEnd 01:4203 sDMGTSpeedCurveEnd
01:4205 sDMGTSpeedCurveSpecialData 01:4205 sDMGTSpeedCurveSpecialData
@ -517,103 +520,103 @@
04:4bd3 TitleEventLoopHandlerB 04:4bd3 TitleEventLoopHandlerB
04:4be1 TitleEventLoopHandlerB.jumps 04:4be1 TitleEventLoopHandlerB.jumps
04:4bf0 TitleEventLoopHandlerB.eventLoopMain 04:4bf0 TitleEventLoopHandlerB.eventLoopMain
04:4c13 TitleEventLoopHandlerB.d0 04:4c1a TitleEventLoopHandlerB.d0
04:4c27 TitleEventLoopHandlerB.eventLoopProfile 04:4c2e TitleEventLoopHandlerB.eventLoopProfile
04:4c28 TitleEventLoopHandlerB.eventLoopSettings 04:4c2f TitleEventLoopHandlerB.eventLoopSettings
04:4c52 TitleEventLoopHandlerB.d1 04:4c59 TitleEventLoopHandlerB.d1
04:4c67 TitleEventLoopHandlerB.l1 04:4c6e TitleEventLoopHandlerB.l1
04:4c7c TitleEventLoopHandlerB.r1 04:4c83 TitleEventLoopHandlerB.r1
04:4c90 TitleEventLoopHandlerB.eventLoopRecords 04:4c97 TitleEventLoopHandlerB.eventLoopRecords
04:4c91 TitleEventLoopHandlerB.eventLoopCredits 04:4c98 TitleEventLoopHandlerB.eventLoopCredits
04:4ca7 TitleEventLoopHandlerB.quitcredits 04:4cae TitleEventLoopHandlerB.quitcredits
04:4cac TitleVBlankHandlerB 04:4cb3 TitleVBlankHandlerB
04:4cba TitleVBlankHandlerB.jumps 04:4cc1 TitleVBlankHandlerB.jumps
04:4cc9 TitleVBlankHandlerB.vblankMain 04:4cd0 TitleVBlankHandlerB.vblankMain
04:4cd3 TitleVBlankHandlerB.notselected_u5 04:4cda TitleVBlankHandlerB.notselected_u5
04:4cd8 TitleVBlankHandlerB.selected_u5 04:4cdf TitleVBlankHandlerB.selected_u5
04:4cdb TitleVBlankHandlerB.done_u5 04:4ce2 TitleVBlankHandlerB.done_u5
04:4ce5 TitleVBlankHandlerB.notselected_u6 04:4cec TitleVBlankHandlerB.notselected_u6
04:4cea TitleVBlankHandlerB.selected_u6 04:4cf1 TitleVBlankHandlerB.selected_u6
04:4ced TitleVBlankHandlerB.done_u6 04:4cf4 TitleVBlankHandlerB.done_u6
04:4cf7 TitleVBlankHandlerB.notselected_u7 04:4cfe TitleVBlankHandlerB.notselected_u7
04:4cfc TitleVBlankHandlerB.selected_u7 04:4d03 TitleVBlankHandlerB.selected_u7
04:4cff TitleVBlankHandlerB.done_u7 04:4d06 TitleVBlankHandlerB.done_u7
04:4d09 TitleVBlankHandlerB.notselected_u8 04:4d10 TitleVBlankHandlerB.notselected_u8
04:4d0e TitleVBlankHandlerB.selected_u8 04:4d15 TitleVBlankHandlerB.selected_u8
04:4d11 TitleVBlankHandlerB.done_u8 04:4d18 TitleVBlankHandlerB.done_u8
04:4d1b TitleVBlankHandlerB.notselected_u9 04:4d22 TitleVBlankHandlerB.notselected_u9
04:4d20 TitleVBlankHandlerB.selected_u9 04:4d27 TitleVBlankHandlerB.selected_u9
04:4d23 TitleVBlankHandlerB.done_u9 04:4d2a TitleVBlankHandlerB.done_u9
04:4d2d TitleVBlankHandlerB.notselected_u10 04:4d34 TitleVBlankHandlerB.notselected_u10
04:4d32 TitleVBlankHandlerB.selected_u10 04:4d39 TitleVBlankHandlerB.selected_u10
04:4d35 TitleVBlankHandlerB.done_u10 04:4d3c TitleVBlankHandlerB.done_u10
04:4dbf TitleVBlankHandlerB.disabled 04:4dc6 TitleVBlankHandlerB.disabled
04:4dcb TitleVBlankHandlerB.profile 04:4dd2 TitleVBlankHandlerB.profile
04:4dda TitleVBlankHandlerB.vblankProfile 04:4de1 TitleVBlankHandlerB.vblankProfile
04:4ddb TitleVBlankHandlerB.vblankSettings 04:4de2 TitleVBlankHandlerB.vblankSettings
04:4de5 TitleVBlankHandlerB.notselected_u11 04:4dec TitleVBlankHandlerB.notselected_u11
04:4dea TitleVBlankHandlerB.selected_u11 04:4df1 TitleVBlankHandlerB.selected_u11
04:4ded TitleVBlankHandlerB.done_u11 04:4df4 TitleVBlankHandlerB.done_u11
04:4df7 TitleVBlankHandlerB.notselected_u12 04:4dfe TitleVBlankHandlerB.notselected_u12
04:4dfc TitleVBlankHandlerB.selected_u12 04:4e03 TitleVBlankHandlerB.selected_u12
04:4dff TitleVBlankHandlerB.done_u12 04:4e06 TitleVBlankHandlerB.done_u12
04:4e09 TitleVBlankHandlerB.notselected_u13 04:4e10 TitleVBlankHandlerB.notselected_u13
04:4e0e TitleVBlankHandlerB.selected_u13 04:4e15 TitleVBlankHandlerB.selected_u13
04:4e11 TitleVBlankHandlerB.done_u13 04:4e18 TitleVBlankHandlerB.done_u13
04:4e1b TitleVBlankHandlerB.notselected_u14 04:4e22 TitleVBlankHandlerB.notselected_u14
04:4e20 TitleVBlankHandlerB.selected_u14 04:4e27 TitleVBlankHandlerB.selected_u14
04:4e23 TitleVBlankHandlerB.done_u14 04:4e2a TitleVBlankHandlerB.done_u14
04:4e2d TitleVBlankHandlerB.notselected_u15 04:4e34 TitleVBlankHandlerB.notselected_u15
04:4e32 TitleVBlankHandlerB.selected_u15 04:4e39 TitleVBlankHandlerB.selected_u15
04:4e35 TitleVBlankHandlerB.done_u15 04:4e3c TitleVBlankHandlerB.done_u15
04:4e3f TitleVBlankHandlerB.notselected_u16 04:4e46 TitleVBlankHandlerB.notselected_u16
04:4e44 TitleVBlankHandlerB.selected_u16 04:4e4b TitleVBlankHandlerB.selected_u16
04:4e47 TitleVBlankHandlerB.done_u16 04:4e4e TitleVBlankHandlerB.done_u16
04:4e51 TitleVBlankHandlerB.notselected_u17 04:4e58 TitleVBlankHandlerB.notselected_u17
04:4e56 TitleVBlankHandlerB.selected_u17 04:4e5d TitleVBlankHandlerB.selected_u17
04:4e59 TitleVBlankHandlerB.done_u17 04:4e60 TitleVBlankHandlerB.done_u17
04:4e63 TitleVBlankHandlerB.notselected_u18 04:4e6a TitleVBlankHandlerB.notselected_u18
04:4e68 TitleVBlankHandlerB.selected_u18 04:4e6f TitleVBlankHandlerB.selected_u18
04:4e6b TitleVBlankHandlerB.done_u18 04:4e72 TitleVBlankHandlerB.done_u18
04:4ef5 TitleVBlankHandlerB.disabled1 04:4efc TitleVBlankHandlerB.disabled1
04:4f01 TitleVBlankHandlerB.buttons 04:4f08 TitleVBlankHandlerB.buttons
04:4f2e TitleVBlankHandlerB.donetetry 04:4f35 TitleVBlankHandlerB.donetetry
04:4f54 TitleVBlankHandlerB.vblankRecords 04:4f5b TitleVBlankHandlerB.vblankRecords
04:4f55 TitleVBlankHandlerB.vblankCredits 04:4f5c TitleVBlankHandlerB.vblankCredits
04:4f56 MainHandleA 04:4f5d MainHandleA
04:4f64 MainHandleA.jumps 04:4f6b MainHandleA.jumps
04:4f76 MainHandleA.tosettings 04:4f7d MainHandleA.tosettings
04:4f7b MainHandleA.tocredits 04:4f82 MainHandleA.tocredits
04:4f80 MainHandleUp 04:4f87 MainHandleUp
04:4f92 MainHandleDown 04:4f99 MainHandleDown
04:4fa3 SettingsHandleA 04:4faa SettingsHandleA
04:4fb0 SettingsHandleB 04:4fb7 SettingsHandleB
04:4fb5 SettingsHandleDown 04:4fbc SettingsHandleDown
04:4fc6 SettingsHandleUp 04:4fcd SettingsHandleUp
04:4fd8 SettingsHandleLeft 04:4fdf SettingsHandleLeft
04:4fe9 SettingsHandleLeft.jumps 04:4ff0 SettingsHandleLeft.jumps
04:5001 SettingsHandleLeft.buttons 04:5008 SettingsHandleLeft.buttons
04:5019 SettingsHandleLeft.rng 04:5020 SettingsHandleLeft.rng
04:5031 SettingsHandleLeft.rot 04:5038 SettingsHandleLeft.rot
04:5049 SettingsHandleLeft.drop 04:5050 SettingsHandleLeft.drop
04:5061 SettingsHandleLeft.curve 04:5068 SettingsHandleLeft.curve
04:507f SettingsHandleLeft.hig 04:5086 SettingsHandleLeft.hig
04:5097 SettingsHandleRight 04:509e SettingsHandleRight
04:50a8 SettingsHandleRight.jumps 04:50af SettingsHandleRight.jumps
04:50c0 SettingsHandleRight.buttons 04:50c7 SettingsHandleRight.buttons
04:50d7 SettingsHandleRight.rng 04:50de SettingsHandleRight.rng
04:50ee SettingsHandleRight.rot 04:50f5 SettingsHandleRight.rot
04:5105 SettingsHandleRight.drop 04:510c SettingsHandleRight.drop
04:511c SettingsHandleRight.curve 04:5123 SettingsHandleRight.curve
04:5139 SettingsHandleRight.hig 04:5140 SettingsHandleRight.hig
04:5150 DecrementLevel 04:5157 DecrementLevel
04:5166 IncrementLevel 04:516d IncrementLevel
04:517c InitSpeedCurve 04:5183 InitSpeedCurve
04:518b GetEnd 04:5192 GetEnd
04:51c2 GetStart 04:51c9 GetStart
04:51f9 CheckLevelRange 04:5200 CheckLevelRange
04:5212 CheckLevelRange.notatend 04:5219 CheckLevelRange.notatend
04:5232 CheckLevelRange.notatstart 04:5239 CheckLevelRange.notatstart
05:4008 FieldInit 05:4008 FieldInit
05:403e FieldClear 05:403e FieldClear
05:4049 ToBackupField 05:4049 ToBackupField

View File

@ -106,6 +106,7 @@ RestoreSRAM::
jp nz, InitializeSRAM jp nz, InitializeSRAM
; SRAM is initialized and for this build, so we can load the data. ; SRAM is initialized and for this build, so we can load the data.
TrustedLoad:
ld a, [rSwapABState] ld a, [rSwapABState]
ld [wSwapABState], a ld [wSwapABState], a
ld a, [rRNGModeState] ld a, [rRNGModeState]
@ -126,14 +127,14 @@ RestoreSRAM::
ld [wProfileName+2], a ld [wProfileName+2], a
; Restore the start level. ; Restore the start level.
ld b, BANK_OTHER
rst RSTSwitchBank
ld a, [rSelectedStartLevel] ld a, [rSelectedStartLevel]
ld c, a ld c, a
ld a, [rSelectedStartLevel+1] ld a, [rSelectedStartLevel+1]
ld b, a ld b, a
ld b, BANK_OTHER
rst RSTSwitchBank
ld a, [rSpeedCurveState] ld a, [rSpeedCurveState]
ld d, a ld d, a
add a, d add a, d
@ -302,6 +303,14 @@ InitializeSRAM:
ld [rProfileName2+2], a ld [rProfileName2+2], a
ret ret
NextProfile::
ld a, [rLastProfile]
inc a
cp a, 3
jr nz, .update
xor a, a
.update
jp ChangeProfile
; Change to profile number in A. ; Change to profile number in A.
ChangeProfile:: ChangeProfile::
@ -352,19 +361,22 @@ ChangeProfile::
ld hl, rProfileData ld hl, rProfileData
ld de, rProfileData0 ld de, rProfileData0
ld bc, 64 ld bc, 64
jp UnsafeMemCopy call UnsafeMemCopy
jp TrustedLoad
.lsecond .lsecond
ld hl, rProfileData ld hl, rProfileData
ld de, rProfileData1 ld de, rProfileData1
ld bc, 64 ld bc, 64
jp UnsafeMemCopy call UnsafeMemCopy
jp TrustedLoad
.lthird .lthird
ld hl, rProfileData ld hl, rProfileData
ld de, rProfileData2 ld de, rProfileData2
ld bc, 64 ld bc, 64
jp UnsafeMemCopy call UnsafeMemCopy
jp TrustedLoad
ENDC ENDC

View File

@ -384,6 +384,11 @@ TitleEventLoopHandlerB:
cp a, 1 cp a, 1
jp z, MainHandleA jp z, MainHandleA
; Select?
ldh a, [hSelectState]
cp a, 1
jp z, NextProfile
; Directions? ; Directions?
ldh a, [hUpState] ldh a, [hUpState]
cp a, 1 cp a, 1