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.
The hack
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 scrollx $d25a
.define scrolly $d25d
push af
push hl
in a,($dd) ; get P2 inputs
ld hl,(scrollx)
bit 0,a
jr nz,+
dec hl
+:bit 1,a
jr nz,+
inc hl
+:ld (scrollx),hl
in a,($dc) ; get P1+2 inputs
ld hl,(scrolly)
bit 7,a
jr nz,+
inc hl
+:bit 6,a
jr nz,+
dec hl
+:ld (scrolly),hl
pop hl
pop af
jp $0073
(43 bytes)
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
The evil 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.
Controls:
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
Act 1 (plus ending sequence)
Act 2
Act 3
Bridge Zone
Act 1
Act 2
Act 3
Jungle Zone
Act 1
Act 2
Act 3
Labyrinth Zone
Act 1
Act 2
Act 3
Scrap Brain Zone
Act 1
Act 2
Act 3
Sky Base Zone
Act 1
Act 2
Act 3
Special Stages
Special Stage 1
Special Stage 2
Special Stage 3
Special Stage 4
Special Stage 5
Special Stage 6
Special Stage 7
Special Stage 8
You cannot get to the Special Stages in Scrap Brain Zone or Sky Base Zone, so there are only 8 available.