Difference between revisions of "Expand the music index from $94 to $9F"
From Sonic Retro
(Added info on extending the music index and pointers plus a "bug fix" for song 9F which normally won't play with the original tutorial.) |
m |
||
Line 16: | Line 16: | ||
''(Addition by [[User:Vanya|Vanya]])'' | ''(Addition by [[User:Vanya|Vanya]])'' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
One last thing to note is that song 9F won't play unless one more change is made. | One last thing to note is that song 9F won't play unless one more change is made. |
Revision as of 13:25, 19 October 2014
(Original guide by lukeusher123)
To add more music slots to the sound test, search for this code in the level select routine: <asm>LevSel_NoCheat:
cmpi.w #$94,d0 ; is sound $80-$94 being played? bcs.s LevSel_PlaySnd; if yes, branch cmpi.w #$A0,d0 ; is sound $95-$A0 being played? bcs.s LevelSelect; if yes, branch</asm>
Change the line: <asm> cmpi.w #$94,d0 ; is sound $80-$94 being played?</asm> So it reads: <asm> cmpi.w #$9F,d0 ; is sound $80-$9F being played?</asm> Then rebuild the ROM.
And now the sound test will have the music slots going up to $9F, instead of $94, however attempts to play empty music slots will crash the sound driver, and possibly lock up the emulator. So, make sure you include a song in every slot.
(Addition by Vanya)
One last thing to note is that song 9F won't play unless one more change is made.
<asm>LevSel_NoCheat:
cmpi.w #$94,d0 ; is sound $80-$94 being played? bcs.s LevSel_PlaySnd; if yes, branch cmpi.w #$A0,d0 ; is sound $95-$A0 being played? bcs.s LevelSelect; if yes, branch</asm>
Change the line: <asm> bcs.s LevSel_PlaySnd; if yes, branch</asm> So it reads: <asm> ble.s LevSel_PlaySnd; if yes, branch</asm>