Title Screen Adjustments - RetroKoH/S1Fixed GitHub Wiki
(Original guide by RetroKoH)
Commits: 68f00fc
So, upon first glance, the title screen doesn't seem like there's anything wrong with it, right? Look a bit closer though. There are a few key aspects that we can fix. I don't really qualify these as bugfixes (with one exception), but they are worth fixing regardless. Let's break them down:
- PRESS START BUTTON - Can you see what's wrong with it? Trick question... you can't, because it's not there. This is purely due to a RAM clearing bug, one that's already been addressed here.
- Title Screen Palette - You might notice that despite sharing the same exact art, the Green Hill Zone we see on the title screen is different from the Green Hill Zone we see in-game, specifically the background color used for the water, and the cycling colors of the waterfalls.
- Hedgehog E Fix - One of the 'E's is drawn inconsistently compared to the others. An edit to artnem/Title Screen Foreground.nem is needed. This is noted under Visual Fixes.
- Title Screen Centering - If you look closely, everything is slightly off-centered, 8 pixels to the left. Not a big deal, but we can fix this.
Title Screen Palette
First, we are going to make the Title Screen background palette match that of Green Hill Zone, as there is no reason why they shouldn't match. The first thing we are going to do is cut the Title Screen Palette in half. Let's open the palette file at palette/Title Screen.bin. Loading the 64-color palette into Flex2, here's what it looks like:
Everything below the red line is unnecessary. It's all used for the GHZ background, and we can simply load the actual GHZ palette to have those colors at the ready. We can remove half of the palette by either saving only 2 palette lines of the file in Flex2, or by opening the file in a hex editor and removing half of the bytes in the file.
Once we do that, we might need to adjust the palette pointer for the Title Screen palette (If you are using the latest version of s1disasm, this is not required). Open _inc/Palette Pointers.asm and look for ptr_Pal_Title
. Change the $40
to $20
. This tells the engine to load $20 (32) colors when loading this palette.
Now, we need to find where the Title Screen palette gets loaded, and load the GHZ palette along with it to achieve the desired result. Open sonic.asm and go to Tit_LoadText. Find this code:
moveq #palid_Title,d0 ; load title screen palette
bsr.w PalLoad1
Add another call to PalLoad1 before this one, this time loading the GHZ palette.
moveq #palid_GHZ,d0 ; load GHZ palette first (Only the last two lines will be visible)
bsr.w PalLoad1
moveq #palid_Title,d0 ; overwrite first 2 lines w/ title screen palette
bsr.w PalLoad1
What this does is loads the GHZ palette into Lines 1-3. Title Screen's truncated palette is then loaded into Lines 0-1. This gives us the same Title Screen, with a proper GHZ palette, which will then update should you decide to update the GHZ palette. What's better is that if you want to make the Title Screen show other zones instead of GHZ (optional mod tease?), it becomes far easier to do so with regards to having the proper color palette.
There is still one more thing to change: the cycling palette used for the waterfalls. We are going to remove the cycling palette provided to us, and use GHZ's cycling palette instead! So, first things first, go to palette/Cycle - Title Screen Water.bin and delete that file. Then go to sonic.asm and look for Pal_TitleCyc:. This is a binclude directive for the assembler to include the palette file we just deleted. Yeah... delete that. Finally, we need to make the palette cycling routine load the GHZ cycling palette. Open _inc/PaletteCycle.asm and go to PalCycle_Title. The very first instruction loads the address of Pal_TitleCyc to a0. Change it to (Pal_GHZCyc).l,a0
.
That does it for the palette! Now, onto centering the visual elements.
Title Screen Centering
Source: Sonic Retro thread
There isn't much that needs to be done here. We just need to adjust a few values related to positioning along the X-axis. First, let's shift the objects over. There are two object files we need to edit: _incObj/0E Title Screen Sonic.asm and _incObj/0F Press Start and TM.asm. In both object files, we need to look at where obX(a0) is loaded to in each object's _Main routine. Change Obj0E's x-position from $F0 to $F8. Then, with Obj0F, there are two lines that affect obX. For the first one, change the x-position from $D0 to $D8. Change the second one from $170 to $178. You'll notice that we are shifting everything 8 pixels to the right.
Finally, we need to shift the massive emblem over by 8 pixels. Open sonic.asm and look for this line under Tit_LoadText:
copyTilemap v_128x128&$FFFFFF,$C206,$21,$15
Change the $C206
to $C208
.
Our title screen is looking a lot better, and thanks to the first adjustment, we've opened ourselves up to greater flexibility with regards to the background of the Title Screen. We can take that flexibility to even greater heights by making Title Screen Sonic load art dynamically, but that's for another guide.