Add GRADEUP SFX prio.

This commit is contained in:
Randy Thiemann 2023-11-01 20:51:29 +01:00
parent d38903247e
commit 6719abe893
6 changed files with 408 additions and 385 deletions

Binary file not shown.

View File

@ -141,196 +141,196 @@ ROM0 bank #0:
$1887 = GradeRendering.regulargrade
$188f = GradeRendering.sgrade
$18a5 = GradeRendering.gmgrade
SECTION: $18b0-$1b1d ($026e bytes) ["SFX Functions"]
SECTION: $18b0-$1b31 ($0282 bytes) ["SFX Functions"]
$18b0 = SFXInit
$18d0 = SFXPopQueue
$18e5 = SFXPushQueue
$18f6 = SFXProcessQueue
$1903 = !0
$1920 = SFXTriggerNoise
$192d = !1
$193a = !2
$1946 = SFXEnqueue
$1953 = !3
$1965 = !4
$1975 = !5
$1985 = !6
$1995 = !7
$19a5 = !8
$19b5 = !9
$19c5 = !10
$19d5 = !11
$19e5 = !12
$19f5 = !13
$1a05 = !14
$1a15 = !15
$1a25 = !16
$1a35 = !17
$1a45 = !18
$1a54 = !19
$1a63 = !20
$1a71 = !21
$1a7f = !22
$1a8d = !23
$1a9a = SFXKill
$1abc = SFXPlayNoise
$1ac7 = SFXPlayNoise.noisereg
$1ad4 = !24
$1ade = SFXPlayNoise.savenoiseplayhead
$1ae7 = SFXPlay
$1af2 = !25
$1af5 = SFXPlay.play
$1b01 = SFXPlay.getRegister
$1b0b = !26
$1b15 = SFXPlay.savePlayhead
SECTION: $1b1e-$1d0b ($01ee bytes) ["RNG Functions"]
$1b1e = RNGInit
$1b4e = !0
$1b69 = RNGInit.complexinit
$1b80 = !1
$1b9a = ShiftHistory
$1bb7 = GetNextHellPiece
$1bbc = GetNextTGM1Piece
$1bbf = !2
$1bd7 = !3
$1bd9 = GetNextTGM2Piece
$1bdc = !4
$1bf4 = !5
$1bf6 = GetNextNesPiece
$1c04 = GetNextTGM3Piece
$1c07 = !6
$1c2a = !7
$1c2d = !8
$1c3d = !9
$1c47 = !10
$1c55 = !11
$1c64 = !12
$1c70 = !13
$1c7c = !14
$1c88 = !15
$1c94 = !16
$1ca0 = !17
$1cac = !18
$1cbb = GetNextPiece
$1cc9 = GetNextPiece.nextpiecejumps
$1cd8 = Next35Piece
$1cd8 = !19
$1ce2 = Next7Piece
$1ce2 = !20
$1cec = NextByte
SECTION: $1d0c-$1eae ($01a3 bytes) ["Level Functions"]
$1d0c = LevelInit
$1d5c = LevelUp
$1d80 = LevelUp.doit
$1dc4 = LevelUp.checknlevel
$1df2 = !0
$1e0a = !1
$1e13 = LevelUp.bellmaybe
$1e25 = LevelUp.leveljinglemaybe
$1e32 = LevelUp.checkspeedup
$1e43 = !2
$1e50 = !3
$1e61 = !4
$1e6e = DoSpeedUp
SECTION: $1eaf-$1f7b ($00cd bytes) ["Input Functions"]
$1eaf = InputInit
$1ec1 = GetInput
$1ec1 = GetInput.btns
$1ece = GetInput.readA
$1ed2 = GetInput.setA
$1edd = GetInput.clearA
$1ee0 = GetInput.readB
$1ee4 = GetInput.setB
$1eef = GetInput.clearB
$1ef2 = GetInput.readSelect
$1ef6 = GetInput.setSelect
$1f01 = GetInput.clearSelect
$1f04 = GetInput.readStart
$1f08 = GetInput.setStart
$1f13 = GetInput.clearStart
$1f16 = GetInput.dpad
$1f23 = GetInput.readUp
$1f27 = GetInput.setUp
$1f32 = GetInput.clearUp
$1f35 = GetInput.readDown
$1f39 = GetInput.setDown
$1f44 = GetInput.clearDown
$1f47 = GetInput.readLeft
$1f4b = GetInput.setLeft
$1f56 = GetInput.clearLeft
$1f59 = GetInput.readRight
$1f5d = GetInput.setRight
$1f68 = GetInput.clearRight
$1f6b = GetInput.priorities
$1f76 = GetInput.zero
SECTION: $1f7c-$2047 ($00cc bytes) ["Score Functions"]
$1f7c = ScoreInit
$1f9c = IncreaseScore
$1fd0 = IncreaseScore.doConvert
$1fd2 = !0
$1fe8 = IncreaseScore.carry
$1fea = IncreaseScore.postConvert
$1ff7 = !1
$1ffe = IncreaseScore.preAddDigit
$201e = IncreaseScore.addDigit
$2034 = IncreaseScore.nextDigit
SECTION: $2048-$210a ($00c3 bytes) ["Code Entry Point"]
$2048 = Main
$205d = Main.wvr_u1
$2066 = !0
$2076 = Main.notgbc
$20a3 = Main.nocolortiles
$20c4 = Main.wvb_u2
$20c9 = !1
$20cf = EventLoop
$20e5 = EventLoop.eventloopjumps
$20ee = EventLoopPostHandler
$20f0 = EventLoopPostHandler.wvb_u3
$2102 = EventLoopPostHandler.vblankjumps
SECTION: $210b-$21c1 ($00b7 bytes) ["SRAM Functions"]
$210b = RestoreSRAM
$2164 = InitializeSRAM
SECTION: $21c2-$2233 ($0072 bytes) ["Grading Functions"]
$21c2 = GradeInit
$21d0 = UpdateGrade
$21d9 = UpdateGrade.trygradeup
$21f3 = UpdateGrade.increasegrade
$2207 = CheckForGM
$221d = PrepareScore
SECTION: $2234-$22a1 ($006e bytes) ["Title Function Trampolines"]
$2234 = SwitchToTitle
$223e = TitleEventLoopHandler
$2248 = TitleVBlankHandler
$2252 = DrawOption6
SECTION: $22a2-$22ee ($004d bytes) ["Time Functions"]
$22a2 = TimeInit
$22b7 = ResetTime
$22c2 = HandleTimers
SECTION: $22ef-$231c ($002e bytes) ["Memory Functions"]
$22ef = UnsafeMemCopy
$22f8 = SafeMemCopy.wvr_u1
$22f8 = SafeMemCopy
$2307 = UnsafeMemSet
$230f = SafeMemSet
$230f = SafeMemSet.wvr_u2
SECTION: $231d-$2344 ($0028 bytes) ["Gameplay Function Trampolines"]
$231d = SwitchToGameplay
$2327 = SwitchToGameplayBig
$2331 = GamePlayEventLoopHandler
$233b = GamePlayBigEventLoopHandler
SECTION: $2345-$2366 ($0022 bytes) ["Grading Data"]
$2345 = sGradeScores
SECTION: $2367-$2388 ($0022 bytes) ["OAM Functions"]
$2367 = CopyOAMHandler
$2373 = ClearOAM
SECTION: $2389-$23a1 ($0019 bytes) ["Interrupt Initialization Functions"]
$2389 = IntrInit
$238d = InitializeLCDCInterrupt
SECTION: $23a2-$23ab ($000a bytes) ["OAM DMA Code"]
$23a2 = OAMDMA
$23ac = OAMDMAEnd
EMPTY: $23ac-$3fff ($1c54 bytes)
TOTAL EMPTY: $1c5f bytes
$18d2 = SFXPopQueue
$18e7 = SFXPushQueue
$18f8 = SFXProcessQueue
$1905 = !0
$1926 = SFXTriggerNoise
$1933 = !1
$1940 = !2
$194c = SFXEnqueue
$195e = SFXEnqueue.findsfx
$1973 = !3
$1983 = !4
$1993 = !5
$19a3 = !6
$19b3 = !7
$19c3 = !8
$19d3 = !9
$19e3 = !10
$19f3 = !11
$1a03 = !12
$1a13 = !13
$1a23 = !14
$1a33 = !15
$1a43 = !16
$1a53 = !17
$1a62 = !18
$1a71 = !19
$1a7f = !20
$1a8d = !21
$1a9b = !22
$1aa8 = SFXKill
$1ad0 = SFXPlayNoise
$1adb = SFXPlayNoise.noisereg
$1ae8 = !23
$1af2 = SFXPlayNoise.savenoiseplayhead
$1afb = SFXPlay
$1b06 = !24
$1b09 = SFXPlay.play
$1b15 = SFXPlay.getRegister
$1b1f = !25
$1b29 = SFXPlay.savePlayhead
SECTION: $1b32-$1d1f ($01ee bytes) ["RNG Functions"]
$1b32 = RNGInit
$1b62 = !0
$1b7d = RNGInit.complexinit
$1b94 = !1
$1bae = ShiftHistory
$1bcb = GetNextHellPiece
$1bd0 = GetNextTGM1Piece
$1bd3 = !2
$1beb = !3
$1bed = GetNextTGM2Piece
$1bf0 = !4
$1c08 = !5
$1c0a = GetNextNesPiece
$1c18 = GetNextTGM3Piece
$1c1b = !6
$1c3e = !7
$1c41 = !8
$1c51 = !9
$1c5b = !10
$1c69 = !11
$1c78 = !12
$1c84 = !13
$1c90 = !14
$1c9c = !15
$1ca8 = !16
$1cb4 = !17
$1cc0 = !18
$1ccf = GetNextPiece
$1cdd = GetNextPiece.nextpiecejumps
$1cec = Next35Piece
$1cec = !19
$1cf6 = Next7Piece
$1cf6 = !20
$1d00 = NextByte
SECTION: $1d20-$1ec2 ($01a3 bytes) ["Level Functions"]
$1d20 = LevelInit
$1d70 = LevelUp
$1d94 = LevelUp.doit
$1dd8 = LevelUp.checknlevel
$1e06 = !0
$1e1e = !1
$1e27 = LevelUp.bellmaybe
$1e39 = LevelUp.leveljinglemaybe
$1e46 = LevelUp.checkspeedup
$1e57 = !2
$1e64 = !3
$1e75 = !4
$1e82 = DoSpeedUp
SECTION: $1ec3-$1f8f ($00cd bytes) ["Input Functions"]
$1ec3 = InputInit
$1ed5 = GetInput
$1ed5 = GetInput.btns
$1ee2 = GetInput.readA
$1ee6 = GetInput.setA
$1ef1 = GetInput.clearA
$1ef4 = GetInput.readB
$1ef8 = GetInput.setB
$1f03 = GetInput.clearB
$1f06 = GetInput.readSelect
$1f0a = GetInput.setSelect
$1f15 = GetInput.clearSelect
$1f18 = GetInput.readStart
$1f1c = GetInput.setStart
$1f27 = GetInput.clearStart
$1f2a = GetInput.dpad
$1f37 = GetInput.readUp
$1f3b = GetInput.setUp
$1f46 = GetInput.clearUp
$1f49 = GetInput.readDown
$1f4d = GetInput.setDown
$1f58 = GetInput.clearDown
$1f5b = GetInput.readLeft
$1f5f = GetInput.setLeft
$1f6a = GetInput.clearLeft
$1f6d = GetInput.readRight
$1f71 = GetInput.setRight
$1f7c = GetInput.clearRight
$1f7f = GetInput.priorities
$1f8a = GetInput.zero
SECTION: $1f90-$205b ($00cc bytes) ["Score Functions"]
$1f90 = ScoreInit
$1fb0 = IncreaseScore
$1fe4 = IncreaseScore.doConvert
$1fe6 = !0
$1ffc = IncreaseScore.carry
$1ffe = IncreaseScore.postConvert
$200b = !1
$2012 = IncreaseScore.preAddDigit
$2032 = IncreaseScore.addDigit
$2048 = IncreaseScore.nextDigit
SECTION: $205c-$211e ($00c3 bytes) ["Code Entry Point"]
$205c = Main
$2071 = Main.wvr_u1
$207a = !0
$208a = Main.notgbc
$20b7 = Main.nocolortiles
$20d8 = Main.wvb_u2
$20dd = !1
$20e3 = EventLoop
$20f9 = EventLoop.eventloopjumps
$2102 = EventLoopPostHandler
$2104 = EventLoopPostHandler.wvb_u3
$2116 = EventLoopPostHandler.vblankjumps
SECTION: $211f-$21d5 ($00b7 bytes) ["SRAM Functions"]
$211f = RestoreSRAM
$2178 = InitializeSRAM
SECTION: $21d6-$2247 ($0072 bytes) ["Grading Functions"]
$21d6 = GradeInit
$21e4 = UpdateGrade
$21ed = UpdateGrade.trygradeup
$2207 = UpdateGrade.increasegrade
$221b = CheckForGM
$2231 = PrepareScore
SECTION: $2248-$22b5 ($006e bytes) ["Title Function Trampolines"]
$2248 = SwitchToTitle
$2252 = TitleEventLoopHandler
$225c = TitleVBlankHandler
$2266 = DrawOption6
SECTION: $22b6-$2302 ($004d bytes) ["Time Functions"]
$22b6 = TimeInit
$22cb = ResetTime
$22d6 = HandleTimers
SECTION: $2303-$2330 ($002e bytes) ["Memory Functions"]
$2303 = UnsafeMemCopy
$230c = SafeMemCopy.wvr_u1
$230c = SafeMemCopy
$231b = UnsafeMemSet
$2323 = SafeMemSet
$2323 = SafeMemSet.wvr_u2
SECTION: $2331-$2358 ($0028 bytes) ["Gameplay Function Trampolines"]
$2331 = SwitchToGameplay
$233b = SwitchToGameplayBig
$2345 = GamePlayEventLoopHandler
$234f = GamePlayBigEventLoopHandler
SECTION: $2359-$237a ($0022 bytes) ["Grading Data"]
$2359 = sGradeScores
SECTION: $237b-$239c ($0022 bytes) ["OAM Functions"]
$237b = CopyOAMHandler
$2387 = ClearOAM
SECTION: $239d-$23b5 ($0019 bytes) ["Interrupt Initialization Functions"]
$239d = IntrInit
$23a1 = InitializeLCDCInterrupt
SECTION: $23b6-$23bf ($000a bytes) ["OAM DMA Code"]
$23b6 = OAMDMA
$23c0 = OAMDMAEnd
EMPTY: $23c0-$3fff ($1c40 bytes)
TOTAL EMPTY: $1c4b bytes
ROMX bank #1:
SECTION: $4000-$4007 ($0008 bytes) ["Bank ID BANK_OTHER"]
@ -2279,32 +2279,33 @@ HRAM bank #0:
SECTION: $ffda-$ffe3 ($000a bytes) ["OAM DMA"]
$ffda = hOAMDMA
$ffe0 = !0
SECTION: $ffe4-$ffeb ($0008 bytes) ["High Input Variables"]
$ffe4 = hUpState
$ffe5 = hDownState
$ffe6 = hLeftState
$ffe7 = hRightState
$ffe8 = hAState
$ffe9 = hBState
$ffea = hStartState
$ffeb = hSelectState
SECTION: $ffec-$fff3 ($0008 bytes) ["High SFX Variables"]
$ffec = hPlayhead
$ffee = hPlayQueue
$fff2 = hNoisePlayhead
SECTION: $fff4-$fff5 ($0002 bytes) ["High Time Variables"]
$fff4 = hFrameCtr
$fff5 = hEvenFrame
SECTION: $fff6-$fff6 ($0001 byte) ["High Globals"]
$fff6 = hGameState
SECTION: $fff7-$fff7 ($0001 byte) ["High Interrupt Variables"]
$fff7 = hLCDCCtr
EMPTY: $fff8-$fffe ($0007 bytes)
TOTAL EMPTY: $0007 bytes
SECTION: $ffe4-$ffec ($0009 bytes) ["High SFX Variables"]
$ffe4 = hPlayhead
$ffe6 = hCurrentlyPlaying
$ffe7 = hPlayQueue
$ffeb = hNoisePlayhead
SECTION: $ffed-$fff4 ($0008 bytes) ["High Input Variables"]
$ffed = hUpState
$ffee = hDownState
$ffef = hLeftState
$fff0 = hRightState
$fff1 = hAState
$fff2 = hBState
$fff3 = hStartState
$fff4 = hSelectState
SECTION: $fff5-$fff6 ($0002 bytes) ["High Time Variables"]
$fff5 = hFrameCtr
$fff6 = hEvenFrame
SECTION: $fff7-$fff7 ($0001 byte) ["High Globals"]
$fff7 = hGameState
SECTION: $fff8-$fff8 ($0001 byte) ["High Interrupt Variables"]
$fff8 = hLCDCCtr
EMPTY: $fff9-$fffe ($0006 bytes)
TOTAL EMPTY: $0006 bytes
SUMMARY:
ROM0: 9121 bytes used / 7263 free
ROM0: 9141 bytes used / 7243 free
ROMX: 48836 bytes used / 49468 free in 6 banks
SRAM: 14 bytes used / 8178 free in 1 bank
WRAM0: 3489 bytes used / 607 free
HRAM: 120 bytes used / 7 free
HRAM: 121 bytes used / 6 free

Binary file not shown.

View File

@ -107,120 +107,121 @@
00:188f GradeRendering.sgrade
00:18a5 GradeRendering.gmgrade
00:18b0 SFXInit
00:18d0 SFXPopQueue
00:18e5 SFXPushQueue
00:18f6 SFXProcessQueue
00:1920 SFXTriggerNoise
00:1946 SFXEnqueue
00:1a9a SFXKill
00:1abc SFXPlayNoise
00:1ac7 SFXPlayNoise.noisereg
00:1ade SFXPlayNoise.savenoiseplayhead
00:1ae7 SFXPlay
00:1af5 SFXPlay.play
00:1b01 SFXPlay.getRegister
00:1b15 SFXPlay.savePlayhead
00:1b1e RNGInit
00:1b69 RNGInit.complexinit
00:1b9a ShiftHistory
00:1bb7 GetNextHellPiece
00:1bbc GetNextTGM1Piece
00:1bd9 GetNextTGM2Piece
00:1bf6 GetNextNesPiece
00:1c04 GetNextTGM3Piece
00:1cbb GetNextPiece
00:1cc9 GetNextPiece.nextpiecejumps
00:1cd8 Next35Piece
00:1ce2 Next7Piece
00:1cec NextByte
00:1d0c LevelInit
00:1d5c LevelUp
00:1d80 LevelUp.doit
00:1dc4 LevelUp.checknlevel
00:1e13 LevelUp.bellmaybe
00:1e25 LevelUp.leveljinglemaybe
00:1e32 LevelUp.checkspeedup
00:1e6e DoSpeedUp
00:1eaf InputInit
00:1ec1 GetInput
00:1ec1 GetInput.btns
00:1ece GetInput.readA
00:1ed2 GetInput.setA
00:1edd GetInput.clearA
00:1ee0 GetInput.readB
00:1ee4 GetInput.setB
00:1eef GetInput.clearB
00:1ef2 GetInput.readSelect
00:1ef6 GetInput.setSelect
00:1f01 GetInput.clearSelect
00:1f04 GetInput.readStart
00:1f08 GetInput.setStart
00:1f13 GetInput.clearStart
00:1f16 GetInput.dpad
00:1f23 GetInput.readUp
00:1f27 GetInput.setUp
00:1f32 GetInput.clearUp
00:1f35 GetInput.readDown
00:1f39 GetInput.setDown
00:1f44 GetInput.clearDown
00:1f47 GetInput.readLeft
00:1f4b GetInput.setLeft
00:1f56 GetInput.clearLeft
00:1f59 GetInput.readRight
00:1f5d GetInput.setRight
00:1f68 GetInput.clearRight
00:1f6b GetInput.priorities
00:1f76 GetInput.zero
00:1f7c ScoreInit
00:1f9c IncreaseScore
00:1fd0 IncreaseScore.doConvert
00:1fe8 IncreaseScore.carry
00:1fea IncreaseScore.postConvert
00:1ffe IncreaseScore.preAddDigit
00:201e IncreaseScore.addDigit
00:2034 IncreaseScore.nextDigit
00:2048 Main
00:205d Main.wvr_u1
00:2076 Main.notgbc
00:20a3 Main.nocolortiles
00:20c4 Main.wvb_u2
00:20cf EventLoop
00:20e5 EventLoop.eventloopjumps
00:20ee EventLoopPostHandler
00:20f0 EventLoopPostHandler.wvb_u3
00:2102 EventLoopPostHandler.vblankjumps
00:210b RestoreSRAM
00:2164 InitializeSRAM
00:21c2 GradeInit
00:21d0 UpdateGrade
00:21d9 UpdateGrade.trygradeup
00:21f3 UpdateGrade.increasegrade
00:2207 CheckForGM
00:221d PrepareScore
00:2234 SwitchToTitle
00:223e TitleEventLoopHandler
00:2248 TitleVBlankHandler
00:2252 DrawOption6
00:22a2 TimeInit
00:22b7 ResetTime
00:22c2 HandleTimers
00:22ef UnsafeMemCopy
00:22f8 SafeMemCopy.wvr_u1
00:22f8 SafeMemCopy
00:2307 UnsafeMemSet
00:230f SafeMemSet
00:230f SafeMemSet.wvr_u2
00:231d SwitchToGameplay
00:2327 SwitchToGameplayBig
00:2331 GamePlayEventLoopHandler
00:233b GamePlayBigEventLoopHandler
00:2345 sGradeScores
00:2367 CopyOAMHandler
00:2373 ClearOAM
00:2389 IntrInit
00:238d InitializeLCDCInterrupt
00:23a2 OAMDMA
00:23ac OAMDMAEnd
00:18d2 SFXPopQueue
00:18e7 SFXPushQueue
00:18f8 SFXProcessQueue
00:1926 SFXTriggerNoise
00:194c SFXEnqueue
00:195e SFXEnqueue.findsfx
00:1aa8 SFXKill
00:1ad0 SFXPlayNoise
00:1adb SFXPlayNoise.noisereg
00:1af2 SFXPlayNoise.savenoiseplayhead
00:1afb SFXPlay
00:1b09 SFXPlay.play
00:1b15 SFXPlay.getRegister
00:1b29 SFXPlay.savePlayhead
00:1b32 RNGInit
00:1b7d RNGInit.complexinit
00:1bae ShiftHistory
00:1bcb GetNextHellPiece
00:1bd0 GetNextTGM1Piece
00:1bed GetNextTGM2Piece
00:1c0a GetNextNesPiece
00:1c18 GetNextTGM3Piece
00:1ccf GetNextPiece
00:1cdd GetNextPiece.nextpiecejumps
00:1cec Next35Piece
00:1cf6 Next7Piece
00:1d00 NextByte
00:1d20 LevelInit
00:1d70 LevelUp
00:1d94 LevelUp.doit
00:1dd8 LevelUp.checknlevel
00:1e27 LevelUp.bellmaybe
00:1e39 LevelUp.leveljinglemaybe
00:1e46 LevelUp.checkspeedup
00:1e82 DoSpeedUp
00:1ec3 InputInit
00:1ed5 GetInput
00:1ed5 GetInput.btns
00:1ee2 GetInput.readA
00:1ee6 GetInput.setA
00:1ef1 GetInput.clearA
00:1ef4 GetInput.readB
00:1ef8 GetInput.setB
00:1f03 GetInput.clearB
00:1f06 GetInput.readSelect
00:1f0a GetInput.setSelect
00:1f15 GetInput.clearSelect
00:1f18 GetInput.readStart
00:1f1c GetInput.setStart
00:1f27 GetInput.clearStart
00:1f2a GetInput.dpad
00:1f37 GetInput.readUp
00:1f3b GetInput.setUp
00:1f46 GetInput.clearUp
00:1f49 GetInput.readDown
00:1f4d GetInput.setDown
00:1f58 GetInput.clearDown
00:1f5b GetInput.readLeft
00:1f5f GetInput.setLeft
00:1f6a GetInput.clearLeft
00:1f6d GetInput.readRight
00:1f71 GetInput.setRight
00:1f7c GetInput.clearRight
00:1f7f GetInput.priorities
00:1f8a GetInput.zero
00:1f90 ScoreInit
00:1fb0 IncreaseScore
00:1fe4 IncreaseScore.doConvert
00:1ffc IncreaseScore.carry
00:1ffe IncreaseScore.postConvert
00:2012 IncreaseScore.preAddDigit
00:2032 IncreaseScore.addDigit
00:2048 IncreaseScore.nextDigit
00:205c Main
00:2071 Main.wvr_u1
00:208a Main.notgbc
00:20b7 Main.nocolortiles
00:20d8 Main.wvb_u2
00:20e3 EventLoop
00:20f9 EventLoop.eventloopjumps
00:2102 EventLoopPostHandler
00:2104 EventLoopPostHandler.wvb_u3
00:2116 EventLoopPostHandler.vblankjumps
00:211f RestoreSRAM
00:2178 InitializeSRAM
00:21d6 GradeInit
00:21e4 UpdateGrade
00:21ed UpdateGrade.trygradeup
00:2207 UpdateGrade.increasegrade
00:221b CheckForGM
00:2231 PrepareScore
00:2248 SwitchToTitle
00:2252 TitleEventLoopHandler
00:225c TitleVBlankHandler
00:2266 DrawOption6
00:22b6 TimeInit
00:22cb ResetTime
00:22d6 HandleTimers
00:2303 UnsafeMemCopy
00:230c SafeMemCopy.wvr_u1
00:230c SafeMemCopy
00:231b UnsafeMemSet
00:2323 SafeMemSet
00:2323 SafeMemSet.wvr_u2
00:2331 SwitchToGameplay
00:233b SwitchToGameplayBig
00:2345 GamePlayEventLoopHandler
00:234f GamePlayBigEventLoopHandler
00:2359 sGradeScores
00:237b CopyOAMHandler
00:2387 ClearOAM
00:239d IntrInit
00:23a1 InitializeLCDCInterrupt
00:23b6 OAMDMA
00:23c0 OAMDMAEnd
01:4008 sDMGTSpeedCurve
01:4210 sDMGTSpeedCurveEnd
01:4212 sTGM1SpeedCurve
@ -1949,18 +1950,19 @@
00:ffd8 hPrePause
00:ffd9 hRequestedJingle
00:ffda hOAMDMA
00:ffe4 hUpState
00:ffe5 hDownState
00:ffe6 hLeftState
00:ffe7 hRightState
00:ffe8 hAState
00:ffe9 hBState
00:ffea hStartState
00:ffeb hSelectState
00:ffec hPlayhead
00:ffee hPlayQueue
00:fff2 hNoisePlayhead
00:fff4 hFrameCtr
00:fff5 hEvenFrame
00:fff6 hGameState
00:fff7 hLCDCCtr
00:ffe4 hPlayhead
00:ffe6 hCurrentlyPlaying
00:ffe7 hPlayQueue
00:ffeb hNoisePlayhead
00:ffed hUpState
00:ffee hDownState
00:ffef hLeftState
00:fff0 hRightState
00:fff1 hAState
00:fff2 hBState
00:fff3 hStartState
00:fff4 hSelectState
00:fff5 hFrameCtr
00:fff6 hEvenFrame
00:fff7 hGameState
00:fff8 hLCDCCtr

View File

@ -5,6 +5,45 @@ DEF SFX_DATA_INC EQU 1
INCLUDE "globals.asm"
DEF REG_NR10_CH1_SWEEP EQU $10
DEF REG_NR11_CH1_LENDT EQU $11
DEF REG_NR12_CH1_VOLEV EQU $12
DEF REG_NR13_CH1_FRQLO EQU $13
DEF REG_NR14_CH1_FRQHI EQU $14
DEF REG_NR21_CH2_LENDT EQU $16
DEF REG_NR22_CH2_VOLEV EQU $17
DEF REG_NR23_CH2_FRQLO EQU $18
DEF REG_NR24_CH2_FRQHI EQU $19
DEF REG_NR30_CH3_DACEN EQU $1A
DEF REG_NR31_CH3_LENGT EQU $1B
DEF REG_NR32_CH3_VOLUM EQU $1C
DEF REG_NR33_CH3_FRQLO EQU $1D
DEF REG_NR34_CH3_FRQHI EQU $1E
DEF REG_NR41_CH4_LENGT EQU $20
DEF REG_NR42_CH4_VOLEV EQU $21
DEF REG_NR43_CH4_FQRND EQU $22
DEF REG_NR44_CH4_CNTRL EQU $23
DEF REG_NR50_MVOLVINPN EQU $24
DEF REG_NR51_MASTERPAN EQU $25
DEF REG_NR52_MASTERCTL EQU $26
DEF REG_WAVE_PATTERN_0 EQU $30
DEF REG_WAVE_PATTERN_1 EQU $31
DEF REG_WAVE_PATTERN_2 EQU $32
DEF REG_WAVE_PATTERN_3 EQU $33
DEF REG_WAVE_PATTERN_4 EQU $34
DEF REG_WAVE_PATTERN_5 EQU $35
DEF REG_WAVE_PATTERN_6 EQU $36
DEF REG_WAVE_PATTERN_7 EQU $37
DEF REG_WAVE_PATTERN_8 EQU $38
DEF REG_WAVE_PATTERN_9 EQU $39
DEF REG_WAVE_PATTERN_A EQU $3A
DEF REG_WAVE_PATTERN_B EQU $3B
DEF REG_WAVE_PATTERN_C EQU $3C
DEF REG_WAVE_PATTERN_D EQU $3D
DEF REG_WAVE_PATTERN_E EQU $3E
DEF REG_WAVE_PATTERN_F EQU $3F
SECTION "SFX Data", ROMX, BANK[BANK_SFX]
; These sound effects can contain any channel.
sSFXPieceI::

View File

@ -19,45 +19,6 @@ IF !DEF(SFX_ASM)
DEF SFX_ASM EQU 1
DEF REG_NR10_CH1_SWEEP EQU $10
DEF REG_NR11_CH1_LENDT EQU $11
DEF REG_NR12_CH1_VOLEV EQU $12
DEF REG_NR13_CH1_FRQLO EQU $13
DEF REG_NR14_CH1_FRQHI EQU $14
DEF REG_NR21_CH2_LENDT EQU $16
DEF REG_NR22_CH2_VOLEV EQU $17
DEF REG_NR23_CH2_FRQLO EQU $18
DEF REG_NR24_CH2_FRQHI EQU $19
DEF REG_NR30_CH3_DACEN EQU $1A
DEF REG_NR31_CH3_LENGT EQU $1B
DEF REG_NR32_CH3_VOLUM EQU $1C
DEF REG_NR33_CH3_FRQLO EQU $1D
DEF REG_NR34_CH3_FRQHI EQU $1E
DEF REG_NR41_CH4_LENGT EQU $20
DEF REG_NR42_CH4_VOLEV EQU $21
DEF REG_NR43_CH4_FQRND EQU $22
DEF REG_NR44_CH4_CNTRL EQU $23
DEF REG_NR50_MVOLVINPN EQU $24
DEF REG_NR51_MASTERPAN EQU $25
DEF REG_NR52_MASTERCTL EQU $26
DEF REG_WAVE_PATTERN_0 EQU $30
DEF REG_WAVE_PATTERN_1 EQU $31
DEF REG_WAVE_PATTERN_2 EQU $32
DEF REG_WAVE_PATTERN_3 EQU $33
DEF REG_WAVE_PATTERN_4 EQU $34
DEF REG_WAVE_PATTERN_5 EQU $35
DEF REG_WAVE_PATTERN_6 EQU $36
DEF REG_WAVE_PATTERN_7 EQU $37
DEF REG_WAVE_PATTERN_8 EQU $38
DEF REG_WAVE_PATTERN_9 EQU $39
DEF REG_WAVE_PATTERN_A EQU $3A
DEF REG_WAVE_PATTERN_B EQU $3B
DEF REG_WAVE_PATTERN_C EQU $3C
DEF REG_WAVE_PATTERN_D EQU $3D
DEF REG_WAVE_PATTERN_E EQU $3E
DEF REG_WAVE_PATTERN_F EQU $3F
INCLUDE "globals.asm"
INCLUDE "res/sfx_data.inc"
INCLUDE "res/music_data.inc"
@ -65,6 +26,7 @@ INCLUDE "res/music_data.inc"
SECTION "High SFX Variables", HRAM
hPlayhead:: ds 2
hCurrentlyPlaying:: ds 1
hPlayQueue:: ds 4
hNoisePlayhead:: ds 2
@ -85,6 +47,7 @@ SFXInit::
ldh [hPlayQueue+1], a
ldh [hPlayQueue+2], a
ldh [hPlayQueue+3], a
ldh [hCurrentlyPlaying], a
xor a, a
ldh [hPlayhead], a
ldh [hPlayhead+1], a
@ -137,7 +100,10 @@ SFXProcessQueue:
jr SFXEnqueue
; Try 4 times to pop a sound effect off the queue.
: call SFXPopQueue
: ld a, $FF
ldh [hCurrentlyPlaying], a
call SFXPopQueue
cp a, $FF
jr nz, :+
call SFXPopQueue
@ -183,19 +149,28 @@ SFXTriggerNoise::
; Attempt to play the sound effect in A. Will enqueue the sound effect if the play routine is currently busy.
SFXEnqueue::
; If the playhead isn't null, then we're already playing something.
; If we're playing the grade up sound, it has absolute prio.
ld b, a
ldh a, [hCurrentlyPlaying]
cp a, SFX_RANKUP
ret z
; If the playhead isn't null, then we're already playing something.
ldh a, [hPlayhead]
ld l, a
ldh a, [hPlayhead+1]
ld h, a
or a, l
jr z, :+
jr z, .findsfx
ld a, b
jr SFXPushQueue
.findsfx
ld a, b
ldh [hCurrentlyPlaying], a
; Menu music
: ld a, b
ld a, b
cp a, MUSIC_MENU
jr nz, :+
ldh [hPlayQueue], a
@ -385,6 +360,12 @@ SFXEnqueue::
; Kill the non-noise sound and clear the queue.
SFXKill::
; If we're playing the grade up sound, it has absolute prio and cannot be killed.
ld b, a
ldh a, [hCurrentlyPlaying]
cp a, SFX_RANKUP
ret z
; Kill all sound without pops.
ld a, %00111111
ldh [rNR11], a