Difference between revisions of "Display the Press Start Button text"
From Sonic Retro
Scarred Sun (talk | contribs) m (Text replacement - "</asm>" to "</syntaxhighlight>") |
Scarred Sun (talk | contribs) m (Text replacement - "<asm>" to "<syntaxhighlight lang="asm">") |
||
Line 7: | Line 7: | ||
To fix this, you simply need to go to '''Tit_LoadText:'''. Find this piece of code: | To fix this, you simply need to go to '''Tit_LoadText:'''. Find this piece of code: | ||
− | <asm> | + | <syntaxhighlight lang="asm"> |
lea (v_objspace+$80).w,a1 | lea (v_objspace+$80).w,a1 | ||
moveq #0,d0 | moveq #0,d0 | ||
Line 18: | Line 18: | ||
move.b #id_TitleSonic,(v_objspace+$40).w ; load big Sonic object</syntaxhighlight> | move.b #id_TitleSonic,(v_objspace+$40).w ; load big Sonic object</syntaxhighlight> | ||
And replace it with this: | And replace it with this: | ||
− | <asm> lea (v_objspace+$80).w,a1 | + | <syntaxhighlight lang="asm"> lea (v_objspace+$80).w,a1 |
moveq #0,d0 | moveq #0,d0 | ||
move.w #$F,d1 ; ($40 / 4) - 1 | move.w #$F,d1 ; ($40 / 4) - 1 | ||
Line 32: | Line 32: | ||
To fix this, you simply need to go to '''Title_LoadText:'''. Find this piece of code: | To fix this, you simply need to go to '''Title_LoadText:'''. Find this piece of code: | ||
− | <asm> lea ($FFFFD080).w,a1 | + | <syntaxhighlight lang="asm"> lea ($FFFFD080).w,a1 |
moveq #0,d0 | moveq #0,d0 | ||
move.w #7,d1 | move.w #7,d1 | ||
Line 42: | Line 42: | ||
move.b #$E,($FFFFD040).w ; load big Sonic object</syntaxhighlight> | move.b #$E,($FFFFD040).w ; load big Sonic object</syntaxhighlight> | ||
And replace it with this: | And replace it with this: | ||
− | <asm> lea ($FFFFD080).w,a1 | + | <syntaxhighlight lang="asm"> lea ($FFFFD080).w,a1 |
moveq #0,d0 | moveq #0,d0 | ||
move.w #$F,d1 ; ($40 / 4) - 1 | move.w #$F,d1 ; ($40 / 4) - 1 |
Revision as of 21:45, 20 December 2015
(Original guide by Quickman. Updated for GitHub Disassembly by Egor305)
In Sonic 1, there is an object for a 'PRESS START BUTTON' message on the title screen. While present in earlier versions of the game, in the final version, it's not there. Well, not really: it is there, but it's invisible.
GitHub Disassembly
This version of the guide is for the GitHub disassembly.
To fix this, you simply need to go to Tit_LoadText:. Find this piece of code:
lea (v_objspace+$80).w,a1
moveq #0,d0
move.w #7,d1
Tit_ClrObj2:
move.l d0,(a1)+
dbf d1,Tit_ClrObj2
move.b #id_TitleSonic,(v_objspace+$40).w ; load big Sonic object
And replace it with this:
lea (v_objspace+$80).w,a1
moveq #0,d0
move.w #$F,d1 ; ($40 / 4) - 1
Tit_ClrObj2:
move.l d0,(a1)+
dbf d1,Tit_ClrObj2
move.b #id_TitleSonic,(v_objspace+$40).w ; load big Sonic object
Hivebrain's 2005 Disassembly
This version of the guide is for Hivebrain's 2005 disassembly.
To fix this, you simply need to go to Title_LoadText:. Find this piece of code:
lea ($FFFFD080).w,a1
moveq #0,d0
move.w #7,d1
Title_ClrObjRam2:
move.l d0,(a1)+
dbf d1,Title_ClrObjRam2
move.b #$E,($FFFFD040).w ; load big Sonic object
And replace it with this:
lea ($FFFFD080).w,a1
moveq #0,d0
move.w #$F,d1 ; ($40 / 4) - 1
Title_ClrObjRam2:
move.l d0,(a1)+
dbf d1,Title_ClrObjRam2
move.b #$E,($FFFFD040).w ; load big Sonic object
Result
Now you should be able to see this message:
“ | I've finally isolated precisely why the PRESS START BUTTON (PSB) text doesn't appear on the Sonic 1 title screen, and given the nature I suspect it to be a bug in Sonic Team's original code. (You may now be shocked.)
Now, the PSB object is initialised in object RAM slot $D080 on line 3237 of the disassembly I'm currently using (modified by Pu7o to work on Linux; it's just under the label Title_ClrObjRam2, in case it's not the same line in an unmodified Sonic 1 disassembly). That same chunk of RAM is previously used for the SONIC TEAM PRESENTS (STP) object earlier in the TitleScreen routine (line 3162, adjust as necessary). The reason the PSB text doesn't appear is because the STP object scribbles in object RAM, but the TitleScreen routine only clears the top $1C bytes. Any data between $D09C and $D0A0 previously touched by the STB object is unmodified. The correction is simple enough; delete the object RAM for the object at $D080 more thoroughly. |
„ |
— Quickman |