Sonic the hedgehog 2

Make your own debug mode

Submitted by Guifrog on May 18 2005.
This is very easy to edit. Each level has a list of objects for debug mode. So, in hex, the first two bytes for debug mode editing indicates the number of objects to have in this list. These bytes are in NN NN format, where the first one should stay "00" unless you want more than 255 objects! For example, type "01 00" and you will get 256 objects to load. Now, each object loaded (next to the already mentioned bytes) follow this format:

OO MM MM MM DD SS VV VV

OO = Object number to use.
MM = Location on the rom to load the mapping for the sprite (see, that's why i put a "MM" =P. Mapping).
DD = Declaration for object loading. For example, if the object loaded are spikes, it switches the type of them (up/down-moving spikes, larger amount of spikes).
SS = Object frame to display. Usually the first frame (00)
VV = The first value of the first byte indicates the palette to use, as well as the flip/mirror suggestion for the sprite (0 points to the first palette line and doesn't flip/mirror the object). The last value of the first byte and the whole second byte are the location in VRAM to load the object art. If it passes the "08 00" value, it will load from "00 00" again, but with mirrored image.

This format continues until the last object from the level debug mode list. Offsets:
(i'm quite confused about MTZ debug list address)

0x41D40 - EHZ
0x41EEC - WFZ
0x41FEE - HTZ
0x420E8 - HPZ/OOZ
0x421F2 - MCZ
0x422B4 - CNZ
0x42376 - CPZ
0x42438 - ARZ
0x42522 - SCZ

0x41D2E - DEZ and unused levels


Back to: Sonic the hedgehog 2
Table of contents