Addressed Music
22 Apr 2012 08:19 AM |
MarkeyJester
in Sonic 1
OK, so, I remember someone saying to me about music and sound limits, and they believed the highest value they could get their ID's up to were 80 - 7F, today I wanted to remove that limit, so I did.
Here is a disassembly of Sonic 1 that has been altered to read the location of music rather than an ID:
Download
Here's how it works, originally, if you wanted to play a music track, you would do this:
That ID can only be from 80 to 7F, that leaves you with 100 slots for music, sfx and control. In the one above, you would do this instead:
Here, you simply move the location of the music (no matter where it is) to d0, and call the routine, There are 4 types to use:
PlayMusic for BGM music, PlaySound for SFX, PlayAdvance for advance SFX of ID D0 and higher, and PlayControl for the special E0 - E4 software sound manipulation (fading, stopping, speed change, SEGA sound, etc).
There are now no ID limits, only the limit of the ROM, if you wish to apply it to your disassembly rather than having to build off of the one above, search for "; MJ:" I have tagged all of the changes made.
There SHOULD be no bugs, but even the best of us make mistakes, good luck and enjoy.
Here is a disassembly of Sonic 1 that has been altered to read the location of music rather than an ID:
Download
Here's how it works, originally, if you wanted to play a music track, you would do this:
Music move.b #$81,d0 bsr PlaySound
That ID can only be from 80 to 7F, that leaves you with 100 slots for music, sfx and control. In the one above, you would do this instead:
Music move.l #Music81,d0 bsr PlayMusic
Here, you simply move the location of the music (no matter where it is) to d0, and call the routine, There are 4 types to use:
Music move.l #Music81,d0 bsr PlayMusic move.l #SoundA0,d0 bsr PlaySound move.l #SoundD0,d0 bsr PlayAdvance move.l #Sound_E0,d0 bsr PlayControl
PlayMusic for BGM music, PlaySound for SFX, PlayAdvance for advance SFX of ID D0 and higher, and PlayControl for the special E0 - E4 software sound manipulation (fading, stopping, speed change, SEGA sound, etc).
There are now no ID limits, only the limit of the ROM, if you wish to apply it to your disassembly rather than having to build off of the one above, search for "; MJ:" I have tagged all of the changes made.
There SHOULD be no bugs, but even the best of us make mistakes, good luck and enjoy.












2 Comments
Great, but is there a way to achieve this in Sonic 2?