Need I explain this game? A seminal classic platformer, and some (probably just me) might argue it’s better than any other version, thanks to its elegance and controllability (later versions tended to go overboard on speed).
Anyway, it also has beautiful design, like Wonder Boy III it takes the system’s capabilities and limitations and works with the former without showing the latter. The colours look perfect, not like graphics that have been reduced down to the system. The levels are huge, and you have great freedom of motion.
Well, not quite enough for me. For this game, I knew there were areas that you just can’t see when playing. So a hack was needed.
In eSMS I watched the RAM values changing as I jumped, isolating the ones that seemed to be determining the “camera” position at $d25a and $d25d. I applied a Meka RAM patch and determined they were the right locations. I disassembled the ROM and looked at the VBlank handler at $0038; it just said
jp $0073, followed by a bit of text stored in the ROM by the developers, which gave me a total of 46 bytes in which to write something interesting. I came up with this:
.define scrolly $d25d
in a,($dd) ; get P2 inputs
in a,($dc) ; get P1+2 inputs
This lets the second joypad control the “camera”, so the game remains playable. I used WLA DX’s excellent
.background functionality to allow me to patch the ROM automatically using assembler rather than machine code, and tried it out; and it worked!
However, this wasn’t enough because the game has a lot of other routines accessing and changing these variables, most notably to stop Sonic going offscreen (not that it works all the time, when you get up speed) but also for things like restricting the camera to the defined level area (a good thing, usually) and for autoscrolling the level in Bridge Zone Act 2 (a bad thing). Therefore, I carefully removed all of the unwanted writes to these variables, giving me freedom to move the camera as I wanted. Interestingly, some of the levels restrict the camera position to an area smaller than the defined level area; Green Hill Zone Act 1 in particular uses this to allow the ending sequence to be joined on to the end of it but be inaccessible.
A fair few more hacks were needed; I stopped palette animations by writing two zero bytes at $0592, but this stopped all palette loads so I had to enable and disable it appropriately. I stopped the timer and gave myself 50 rings with RAM patches. However, even with all this I still had to play through some of the levels to get the effects I needed, so it was a couple of days’ work. So be grateful!
Brief game guide
Eggman Dr. Robotnik has stolen the Chaos Emeralds and taken over your island, imprisoning the animals and turning them into robots! You have to find all the emeralds hidden around the island and defeat him.
- L/R = run
- D = duck/spin/look down
- U = look up
- 1/2 = jump
Jump and spin at
enemies robots to kill them release the little animal inside.
Green Hill Zone
Scrap Brain Zone
Sky Base Zone
You cannot get to the Special Stages in Scrap Brain Zone or Sky Base Zone, so there are only 8 available.