Actions

SCHG How-to

Difference between revisions of "Display the Press Start Button text"

From Sonic Retro

m (I like it this way more.)
m (Result)
 
(26 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{GuideBy|Quickman}}
+
''(Original guide by [[User:Quickman|Quickman]]. Updated for the latest GitHub disassembly by [[User:ArtmeierCompanies|Devon]].)''
  
In the Sonic 1 is an object for a PRESS START BUTTON message on the title screen. However, in the final version it's not there. Well, not really. It is there, but it's invisible. To fix that you simply need to go to '''Title_LoadText:'''. Find this piece of code:
+
In Sonic 1, there is a invincible 'PRESS START BUTTON' message on the title screen. While seen in the [https://tcrf.net/images/8/81/Sonic1proto_titlescreen.png Sonic 1 Prototype], in the final version, it's there, but just not visible.
<asm> lea ($FFFFD080).w,a1
+
 
moveq #0,d0
+
==Hivebrain 2005 Disassembly==
move.w #7,d1
+
This version of the guide is for the [[Disassemblies#Revision_00|Hivebrain 2005]] disassembly.
 +
 
 +
To fix this, you simply need to go to '''sonic.asm''' and search for '''Title_ClrObjRam2:''' (Line 3235), where you will end up here:
 +
<syntaxhighlight lang="asm">               lea     ($FFFFD080).w,a1
 +
                moveq   #0,d0
 +
                move.w #7,d1
  
 
Title_ClrObjRam2:
 
Title_ClrObjRam2:
move.l d0,(a1)+
+
                move.l d0,(a1)+
dbf d1,Title_ClrObjRam2
+
                dbf     d1,Title_ClrObjRam2
 +
</syntaxhighlight>
 +
 
 +
 
 +
Change the '''7''' (derived from '''$20/4-1''') to '''$F''' (derived from '''$40/4-1'''):
 +
<syntaxhighlight lang="asm">                lea    ($FFFFD080).w,a1
 +
                moveq  #0,d0
 +
                move.w  #$F,d1                  ; $40/4-1
  
move.b #$E,($FFFFD040).w ; load big Sonic object</asm>
 
And replace it with this:
 
<asm> lea ($FFFFD080).w,a1
 
; moveq #0,d0
 
; move.w #7,d1
 
 
 
Title_ClrObjRam2:
 
Title_ClrObjRam2:
; move.l d0,(a1)+
+
                move.l d0,(a1)+
; dbf d1,Title_ClrObjRam2
+
                dbf     d1,Title_ClrObjRam2
                jsr    DeleteObject2
+
</syntaxhighlight>
move.b #$E,($FFFFD040).w ; load big Sonic object</asm>
+
 
 +
==GitHub Disassembly==
 +
This version of the guide is for the [https://github.com/sonicretro/s1disasm GitHub] disassembly.
 +
 
 +
To fix this, you simply need to go to '''sonic.asm''' and search for '''Tit_LoadText:'''. (Line 2173) and find this piece of code (scroll down until you see it):
 +
<syntaxhighlight lang="asm">                ; Bug: this only clears half of the "SONIC TEAM PRESENTS" slot.
 +
                ; This is responsible for why the "PRESS START BUTTON" text doesn't
 +
                ; show up, as the routine ID isn't reset.
 +
                clearRAM v_sonicteam,v_sonicteam+object_size/2
 +
</syntaxhighlight>
 +
 
 +
 
 +
Simply remove the '''/2''':
 +
<syntaxhighlight lang="asm">                clearRAM v_sonicteam,v_sonicteam+object_size
 +
</syntaxhighlight>
  
And now you should be able to see this message:
+
==Result==
 +
Now you should be able to see the '''PRESS START BUTTON''':
  
 
[[File:S1-PressStart.png]]
 
[[File:S1-PressStart.png]]
  
 +
'''Disclaimer:''' That screenshot depicts REV00 with the fix applied. REV01 slightly changed the background Y position.
  
Original statement by [[Quickman]] on the {{linkRetro|topic=10240|title=Forums}}:
+
==Original Explanation==
 +
Written by [[User:Quickman|Quickman]] on the {{linkRetro|topic=10240|title=Forums}}:
 
{{quote|I've finally isolated precisely why the PRESS START BUTTON (PSB) text doesn't appear on the [[Sonic the Hedgehog (16-bit)|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.)
 
{{quote|I've finally isolated precisely why the PRESS START BUTTON (PSB) text doesn't appear on the [[Sonic the Hedgehog (16-bit)|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).
+
Now, the PSB object is initialised in object RAM slot $D080 on line 3237 of the disassembly I'm currently using (modified by [[User:Puto|Puto]] 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. This, I suspect, is why the PSB text fails to appear, and it's a surprisingly difficult bug to track down without really scrutinising the code and a few quite remarkable deductions.
+
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. |2=[[Quickman]]}}
+
The correction is simple enough; delete the object RAM for the object at $D080 more thoroughly. |2=[[User:Quickman|Quickman]]}}
[[Category:SCHG How-tos|Display the Press Start Button text]]
+
{{S1Howtos}}
 +
|Display the Press Start Button text]]

Latest revision as of 19:37, 3 June 2024

(Original guide by Quickman. Updated for the latest GitHub disassembly by Devon.)

In Sonic 1, there is a invincible 'PRESS START BUTTON' message on the title screen. While seen in the Sonic 1 Prototype, in the final version, it's there, but just not visible.

Hivebrain 2005 Disassembly

This version of the guide is for the Hivebrain 2005 disassembly.

To fix this, you simply need to go to sonic.asm and search for Title_ClrObjRam2: (Line 3235), where you will end up here:

                lea     ($FFFFD080).w,a1
                moveq   #0,d0
                move.w  #7,d1

Title_ClrObjRam2:
                move.l  d0,(a1)+
                dbf     d1,Title_ClrObjRam2


Change the 7 (derived from $20/4-1) to $F (derived from $40/4-1):

                lea     ($FFFFD080).w,a1
                moveq   #0,d0
                move.w  #$F,d1                  ; $40/4-1

Title_ClrObjRam2:
                move.l  d0,(a1)+
                dbf     d1,Title_ClrObjRam2

GitHub Disassembly

This version of the guide is for the GitHub disassembly.

To fix this, you simply need to go to sonic.asm and search for Tit_LoadText:. (Line 2173) and find this piece of code (scroll down until you see it):

                ; Bug: this only clears half of the "SONIC TEAM PRESENTS" slot.
                ; This is responsible for why the "PRESS START BUTTON" text doesn't
                ; show up, as the routine ID isn't reset.
                clearRAM v_sonicteam,v_sonicteam+object_size/2


Simply remove the /2:

                clearRAM v_sonicteam,v_sonicteam+object_size

Result

Now you should be able to see the PRESS START BUTTON:

S1-PressStart.png

Disclaimer: That screenshot depicts REV00 with the fix applied. REV01 slightly changed the background Y position.

Original Explanation

Written by Quickman on the
Sonic Retro
Forums
:
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 Puto 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

SCHG How-To Guide: Sonic the Hedgehog (16-bit)
Fixing Bugs
Fix Demo Playback | Fix a Race Condition with Pattern Load Cues | Fix the SEGA Sound | Display the Press Start Button Text | Fix the Level Select Menu | Fix the Hidden Points Bug | Fix Accidental Deletion of Scattered Rings | Fix Ring Timers | Fix the Walk-Jump Bug | Correct Drowning Bugs | Fix the Death Boundary Bug | Fix the Camera Follow Bug | Fix Song Restoration Bugs | Fix the HUD Blinking | Fix the Level Select Graphics Bug | Fix a remember sprite related bug
Changing Design Choices
Change Spike Behavior | Collide with Water After Being Hurt | Fix Special Stage Jumping Physics | Improve the Fade In\Fade Out Progression Routines | Fix Scattered Rings' Underwater Physics | Remove the Speed Cap | Port the REV01 Background Effects | Port Sonic 2's Level Art Loader | Retain Rings Between Acts | Add Sonic 2 (Simon Wai Prototype) Level Select | Improve ObjectMove Subroutines | Port Sonic 2 Level Select
Adding Features
Add Spin Dash ( Part 1 / Part 2 / Part 3 / Part 4 ) | Add Eggman Monitor | Add Super Sonic | Add the Air Roll
Sound Features
Expand the Sound Index | Play Different Songs Per Act | Port Sonic 2 Final Sound Driver | Port Sonic 3's Sound Driver | Port Flamewing's Sonic 3 & Knuckles Sound Driver | Change The SEGA Sound
Extending the Game
Load Chunks From ROM | Add Extra Characters | Make an Alternative Title Screen | Use Dynamic Tilesets | Make GHZ Load Alternate Art | Make Ending Load Alternate Art | Add a New Zone | Set Up the Goggle Monitor | Add New Moves | Add a Dynamic Collision System | Dynamic Special Stage Walls System | Extend Sprite Mappings and Art Limit | Enigma Credits | Use Dynamic Palettes
Miscellaneous
Convert the Hivebrain 2005 Disassembly to ASM68K
Split Disassembly Guides
Set Up a Split Disassembly | Basic Level Editing | Basic Art Editing | Basic ASM Editing (Spin Dash)

|Display the Press Start Button text]]