While working with Sonic 1, I got tired of having to edit the level select text in a Hex editor, when it's contents is just plain text in a non-standard encoding, I decided enough was enough, and set out to convert Sonic 1's level select to use standard ASCII text encoding. After a very small amount of work, I decided to compile it into a guide.
I am aware that many seasoned hackers will have no use for this, as it is an extremely simple edit, but I think it will help some newbie hackers.
This guide is for the SVN disassembly of Sonic 1. It should be VERY easy to port to other disassemblies as the code changes make no use of macros or equates.
First, download this file (menutext.bin) and replace the existing file in the "artunc" folder. This is the Sonic 2's menu font uncompressed to work in Sonic 1. It's what I use in my hack, and it's what my code expects.
Now open Sonic.asm and find the LevelMenuText label and replace this:
With this (Pastebin link)
As you can see, this is much easier as you can just edit the text directly.
Now we need to modify Sonic 1 to actually understand this text format, so scroll upwards to LevSel_CharOk: and replace this:
With this
Now to fix the Sound Test numbers, find LevSel_ChgSnd and change this line:
To this:
There is one more problem, the Sonic 2 font requires a different colour palette than Sonic 1 uses, so take this file, and place it in the palette folder, overwriting the existing one.
And you are done, build your rom and enjoy the easy to edit text.
EDIT: Gah, forgot to include the new palette.
EDIT2: Pastebin link for the level select text, as the forum keeps fucking up the spacing.
I am aware that many seasoned hackers will have no use for this, as it is an extremely simple edit, but I think it will help some newbie hackers.
This guide is for the SVN disassembly of Sonic 1. It should be VERY easy to port to other disassemblies as the code changes make no use of macros or equates.
First, download this file (menutext.bin) and replace the existing file in the "artunc" folder. This is the Sonic 2's menu font uncompressed to work in Sonic 1. It's what I use in my hack, and it's what my code expects.
Now open Sonic.asm and find the LevelMenuText label and replace this:
LevelMenuText: if Revision=0 incbin "misc\Level Select Text.bin" else incbin "misc\Level Select Text (JP1).bin" endc even
With this (Pastebin link)
As you can see, this is much easier as you can just edit the text directly.
Now we need to modify Sonic 1 to actually understand this text format, so scroll upwards to LevSel_CharOk: and replace this:
LevSel_CharOk: add.w d3,d0 ; combine char with VRAM setting move.w d0,(a6) ; send to VRAM dbf d2,LevSel_LineLoop rts
With this
LevSel_CharOk:
cmp.w #$40, d0 ; Check for $40 (End of ASCII number area)
blt.s @notText ; If this is not an ASCII text character, branch
sub.w #$3,d0 ; Subtract an extra 3 (Compensate for missing characters in the font)
@notText:
sub.w #$30,d0 ; Subtract #$33 (Convert to S2 font from ASCII)
add.w d3,d0 ; combine char with VRAM setting
move.w d0,(a6) ; send to VRAM
dbf d2,LevSel_LineLoop
rts
Now to fix the Sound Test numbers, find LevSel_ChgSnd and change this line:
addi.b #7,d0 ; use alpha characters
To this:
addi.b #4,d0 ; use alpha characters
There is one more problem, the Sonic 2 font requires a different colour palette than Sonic 1 uses, so take this file, and place it in the palette folder, overwriting the existing one.
And you are done, build your rom and enjoy the easy to edit text.
EDIT: Gah, forgot to include the new palette.
EDIT2: Pastebin link for the level select text, as the forum keeps fucking up the spacing.
This post has been edited by SoullessSentinel: 14 July 2013 - 01:15 PM


01