Sonic the Hedgehog (16-bit)
From Sonic Retro
Revision as of 22:00, 16 August 2007 by Ss is testing (talk | contribs)
amstrad dvx lettori dvd smells like tenn spirit zoccoli the up in smoke tour rag against the machine faak it eyes of laura mars soundfonts bipielle the point man handel suite n11 scienza doppia h siamo tre smoke gets in you eyes yamaha - rx-v657 nokia 200 www assistente tecnico it brenda exporto www xplus tv amplificatori classe a palmare gprs gsm erreway mi vida pac 600 cs www tigre it www intimissimi la stoffa del campione rally italia mondiale toscana agriturismo beauty center elettrostimolatore amplificatore 5 ville e giardini sigla triple h wrestling nissan micra 1.3 16v www fuorissimo com test canzone curtains fall diablo 2 trade hack puritania volvo s60 d5 kinetic silbermond il caso difficile del commissario maigret monsignore nokia bl-5c 850 f lemon juice what u get is what u c pmp in nome del padre olympus c-400 tommy hol ellingsen akg k-501 il lancio del pinguin 4 tu pirata oakley straight five for fighting something about you siti erotici viaggi india the smashing pumkins sanlisoy i could be the one iar siltal congelatori cucinare con la pentola apressione concerto della bandabardo campari sapo pt gigi finizio ti cerchero banca popolare pugliese happy chrismas wrestlingmedia blue cover decrypt omicidio berg segreteria vivavoce telefoni pulangkanlah router wireless robotics dymo 450 lettore memory card 4 in 1 blue staff antenna gps per acer n30 voli pantelleria brazilian feet carraresi appassionatamente moto usate in lombardia friends - stagione 1 hifi united piacenza argentero hq 60 intel scheda di rete grafield asus p5wd2 i955x morellato uomo acciaio e oro metallurgia e metalli piedras y flores contratti di lavoro luis mariano lauder fondotinta jamie cullum twentysomething antiche rose master diritto gratuiti zucconi vittorio wir sind wir il delta di venere roches sculture in legno lastminute mosca amilo fujitsu m3438g bennato il rock del capitano uncino tamenghest line6 spider ii hd big sister praga la frusta e il corpo spazio ordine misura schede pooh. ascolta live tour 2004 dth 6300 cuffie tv hp 945 hp macchina truccate fax 530 roiate cartina geografica italiana ricoh toner type 2200 masterizzatore usb esterno giochi dei cartoni animati x files claudio giangiacomo un telecomando per la ps2 europea dieta famosa formato a3 stampante laser colori axis 241q logitech harmony 885 golf iii 1 6 pietra segno zodiacale download gioco bigliardo computer www versioni latine it sony videocamera digitale hdr-fx1 valona yen-an d m n 142 posatore sanpaoloimi com michael lehmann yaeh traduzione latino italiano foto di palme ivan segreto mp3 condizionatori panasonic inverter un grido nel silenzio filmato porno classifica grande fratello z 612 kim sun ill testi canzoni the king of convenience alsop, richard tagliatella winutility magicolor 2350 vigorsol foto come elaborare il motore 2 tempi ipod shuffle sport olympus miu video vip sexy mawson, sir douglas dance 1990 volume sfera moda italiana intel pentium m asus san francisco (argentina) gigabyte gv-nx78x256v-b www telmex com mx sony radio portatile la cantante dei black eyes peas callosciurus tc-dc58 canon akai teramo kamicaze hino euro 2004 davy havok uno della montagna dj gabryponte kissi umida floppy esterno usb studentessa foto nike philips wireless microsoft optical mouse car dvd alpine norton systemworks premier 2005 nassirya pantofola d oro baikal blue angel moon brandy moda wipeout fusion etrex legend c garmin sima 1 garlando 200 algo tienes la tutela dell ambiente testi canzoni nelly furtado mario del monaco rim blackberry 7100g
This short article is in need of work. You can help Sonic Retro by adding to it. |
Contents
ROM Hacking
Art Editing
There are several different tools that can be used to edit art besides the hex editor. SonED is probably the best tool to use for editing level art, and can also be used on palettes. HivePal is also a great tool for editing palettes. Sonik Sprite is useful for editing uncompressed art; it gets its name from its ability to edit Sonic's sprites. LOst Library is most likely the best choice for editing compressed art in the Nemesis format.
If, however, you still want to do it yourself, your best bet is to download the Sonic 1 Split disassembly. Decompress the archive into a new folder, and place your S1 ROM, in binary format and named "S1.bin", in that folder. Run the batch file "split.bat". This will split up all the art into its own binary files, which you can then decompress and edit. When you're done, run "combine.bat".
Uncompressed Art Locations
Most of this information was taken from Nemesis's guide. Please excuse any mistakes or misunderstandings, as that guide wasn't exactly well-written. A description is written in parentheses after the original name if I deem it necessary; if I don't know what it is, "Unknown" appears in that place. Please correct this if you know. It doesn't list the number of blocks taken up, so if you know, put it in. Otherwise, I'll find out eventually.
Uncompressed Art Locations
Offset | Description | # of blocks |
---|---|---|
Zone Independent | ||
$1CADA | Numbers used on counters in game | ? |
$21AFE | Sonic | ? |
$6A324 | Giant Ring | ? |
Green Hill Zone | ||
$66AD6 | Waterfall tiles | ? |
$66CD6 | Flower with pointy petals | ? |
$670D6 | Flower with curved petals | ? |
Marble Zone | ||
$6755A | Lava surface | ? |
$67836 | Lava | ? |
$67E56 | Flame torch against stone | ? |
Scrap Brain Zone | ||
$68156 | Steam in background | ? |
Compressed Art Locations - Nemesis
See SCHG:Sonic the Hedgehog/Nemesis Compressed Art.
Compressed Art Locations - Kosinski format
- $3DCF2 - GHZ main level patterns
- $414D4 - LZ main level patterns
- $46016 - MZ main level patterns
- $4A7FE - SLZ main level patterns
- $510F0 - SYZ main level patterns
- $57A66 - SBZ main level patterns
Palette Locations
Usually, it's not really necessary to edit a palette in hex. Palette editors give you instant feedback for each RGB value, and the palette can be easily saved as a separate binary and reimported into the ROM. However, it is sometimes desireable or necessary to do it in hex, and it can't hurt to know how it's done.
These are the ROM offsets of the palettes in Sonic 1, as listed by HivePal:
Name | Offset |
---|---|
Sega Logo (Background) | $2208 |
Sega Logo (SEGA) | $20C0 |
Title Screen | $2288 |
Title Screen - Water Cycle | $1B66 |
Level Select | $2308 |
Sonic | $2388 |
Green Hill | $23A8 |
Green Hill - Water Cycle | $1B86 |
Labyrinth | $2408 |
Labyrinth - Sonic Underwater | $2828 |
Labyrinth - Sonic Underwater (Alt) | $2468 |
Labyrinth - Underwater | $2488 |
Labyrinth - Water Cycle | $1BA6 |
Labyrinth - Conveyor Cycle | $1BC6 |
Labyrinth - Conveyor Cycle Underwater | $1BD8 |
Marble | $24E8 |
Star Light | $2548 |
Star Light lights | $1C52 |
Spring Yard | $25A8 |
Spring Yard - Cycle 1 | $1C76 |
Spring Yard - Cycle 2 | $1C96 |
Scrap Brain Act 1 | $2608 |
Scrap Brain Act 2/Final | $2668 |
Scrap Brain Act 3 | $2748 |
Scrap Brain Act 3 - Sonic Underwater | $2848 |
Scrap Brain Act 3 - Sonic Underwater (Alt) | $27A8 |
Scrap Brain Act 3 - Underwater | $27C8 |
Scrap Brain Act 1/Act 2 - Cycle 1 | $1D0A |
Scrap Brain Act 1/Act 2 - Cycle 2 | $1D1A |
Scrap Brain Act 1/Act 2 - Cycle 3 | $1D2A |
Scrap Brain Act 1/Act 2 - Cycle 4 | $1D3A |
Scrap Brain Act 1/Act 2 - Cycle 5 | $1D46 |
Scrap Brain Act 1/Act 2 - Cycle 6 | $1D56 |
Scrap Brain Act 1/Act 2 - Cycle 7 | $1D66 |
Scrap Brain Act 1/Act 2 - Cycle 8 | $1D86 |
Scrap Brain Act 2 - Cycle 1 | $1D90 |
Scrap Brain Act 2 - Cycle 2 | $1DA0 |
Scrap Brain Act 3 - Water Cycle | $1BEA |
Special Stage - Sonic | $26C8 |
Special Stage No. 1 | $26E8 |
Special Stage No. 2 | $2708 |
Special Stage No. 3 | $2728 |
Special Stage Title Card | $2868 |
Special Stage Cycle 1 | $4ACA |
Special Stage Cycle 2 | $4B12 |
Special Stage Cycle 3 | $4B92 |
Continue - Sonic | $28E8 |
Continue | $2908 |
Ending - Sonic | $2928 |
Ending | $2948 |
Object Editing
Object Pointer List
ID # | Description | Code | Mappings | Subparameters |
---|---|---|---|---|
01 | Sonic | $12BD8 | ?? | |
02 | ???? | $D5B2 | ?? | |
03 | ???? | $D5B2 | ?? | |
04 | ???? | $D5B2 | ?? | |
05 | ???? | $D5B2 | ?? | |
06 | ???? | $D5B2 | ?? | |
07 | ???? | $D5B2 | ?? | |
08 | LZ water splash | $142F0 | ?? | |
09 | Sonic in Special Stage | $1B984 | ?? | |
0A | Drowning countdown numbers | $13C98 | $14152 | |
0B | LZ vertical pole | $11206 | $11326
$11331 |
|
0C | LZ doors that open and close | $11346 | ?? | $02 |
0D | End of level signpost | $EB28 | ?? | |
0E | ???? | $A61C | ?? | |
0F | ???? | $A69C | ?? | |
10 | ???? | $1C022 | ?? | |
11 | GHZ Bridge | $7328 | ?? |
|
Mappings Editing
Object Placement
RAM Hacking
Main System Memory Locations
This is a map of 68k memory as used by the main gameplay engine. Note that any numbers entered (for example, score or number of rings) will have to be converted to hex first.
These are the offsets in RAM. To convert them to Genecyst savestate offsets, add $2478.
RAM offset | Description |
---|---|
$0000 - $7FFF | Metablock table |
$F600 | Screen Mode
|
$F616-$F617 | Camera Y Position for previous frame |
$F618-$F619 | Value of $F70C for previous frame |
$F61A-$F61B | Camera X Position for previous frame |
$F61C-$F61D | Value of $F708 for previous frame |
$F61E-$F61F | Value of $F71C for previous frame |
$F620-$F621 | Value of $F718 for previous frame |
$F680 | Address queue for Pattern Load Cues |
$F700-$F701 | Camera X Position |
$F704-$F705 | Camera Y Position |
$F744 | Scroll Hold Flag (set to stop all scrolling dead) |
$F754-$F755 $F756-$F757 $F758-$F759 $F75A-$F75B |
Bitfields used by the scrolling engine |
$F760-$F761 | Sonic's Top Speed |
$F762-$F763 | Sonic's Acceleration |
$F764-$F765 | Sonic's Deceleration |
$F7AA | Screen Lock Flag (Set to lock screen) |
$F7C8 | Control Lock Flag (Set to lock controls) |
$FA00-$FA80 | Underwater Palette Storage |
$FE02 | Restart Level Flag (Set to restart level) |
$FE04 | Level Timer |
$FE10-$FE11 | Zone/Act |
$FE12-$FE13 | Rings |
$FE14 | Remaining Air (When underwater) |
$FE16 | Last Special Stage Entered |
$FE18 | Continues |
$FE1C | Lives Counter (Set to update lives total on screen) |
$FE1D | Ring Counter (Set to update rings total on screen) |
$FE1E | Time Counter (Set to update current time on screen) |
$FE1F | Score Counter (Set to update score total on screen) |
$FE26-$FE29 | Score |
$FE2C | Shield Flag (Set to take a single hit without losing rings) |
$FE2D | Invincibility Flag (Set to make Sonic invincible) |
$FE2E | Speed Shoes Flag (Set to activate speed shoe physics) |
$FE30 | Lamppost Counter |
$FE57 | Emeralds |
$FFF4 | Credits Index Number |
Sprite Status Table
The Sprite Status Table is located at RAM address $D000. Each entry is $40 bytes long. Here is a list of all the values for one entry in the SST:
Offset | Size | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$00 | byte | Object type | |||||||||||||||||||||||||||
$01 | byte | Action flags. The bitfield looks like this:
| |||||||||||||||||||||||||||
$02 | word | Starting art block.
| |||||||||||||||||||||||||||
$04 | long | Mappings offset | |||||||||||||||||||||||||||
$08 | word |
| |||||||||||||||||||||||||||
$0A | word |
| |||||||||||||||||||||||||||
$0C | word |
| |||||||||||||||||||||||||||
$0E | word |
| |||||||||||||||||||||||||||
$10 | word | Horizontal (X) velocity | |||||||||||||||||||||||||||
$12 | word | Vertical (Y) velocity | |||||||||||||||||||||||||||
$14 | byte | Ground velocity (inertia). | |||||||||||||||||||||||||||
$16 | byte | Height/2 | |||||||||||||||||||||||||||
$17 | byte | Width/2 | |||||||||||||||||||||||||||
$18 | byte | Sprite priority (00 = front). | |||||||||||||||||||||||||||
$19 | byte | Width of the object, in pixels | |||||||||||||||||||||||||||
$1A | byte | Current animation frame to display. i.e, the frame currently being displayed on-screen, according to the animation script (currently parsed mappings frame, in other words). | |||||||||||||||||||||||||||
$1B | byte | Current frame in animation script. i.e, the frame entry IN the animation script being currently processed. | |||||||||||||||||||||||||||
$1C | byte | Animation number. When an animation ID is moved here, it's processed and displayed. | |||||||||||||||||||||||||||
$1D | byte | Restart animation flag (when $1D is not equal to $1C, animation restarts) | |||||||||||||||||||||||||||
$1E | byte | Animation frame duration (time until next frame). | |||||||||||||||||||||||||||
$20 | byte | Collision response bitfield. Tells what the object will do if hit by the character. The bitfield is in the format TTSS SSSS. TT is the type of collision - 00 is enemy, 01 increments the routine counter, 10 is harm, and 11 seems to be a special thing for the starpole. SSSSSS is the size, lifted from a lookup table in the collision response routine. | |||||||||||||||||||||||||||
$21 | byte | Custom collision property, for special interaction with Sonic. This is used by bosses, badniks, bumpers and other objects. The way in which this byte is used is different for each object. Bosses use this byte as a hit counter. | |||||||||||||||||||||||||||
$22 | byte | Status bitfield.
Counting from the least significant bit:
| |||||||||||||||||||||||||||
$23 | byte | Respawn index reference number, used by badniks, rings and monitors. Each destroyable object is assigned an index number (01, 02, 03 etc.) which refers to a list at $FC00 in the RAM. | |||||||||||||||||||||||||||
$24 | byte | Routine counter. | |||||||||||||||||||||||||||
$25 | byte | Second routine counter. This is used for some of the more complicated objects. | |||||||||||||||||||||||||||
$26 | word | Angle. | |||||||||||||||||||||||||||
$28 | byte | Object subtype. For example, the current monitor selected. See the Object List above for values. Has a different meaning for Sonic. | |||||||||||||||||||||||||||
$29-$3F | Object's scratch RAM | ||||||||||||||||||||||||||||
Object-specific variables | |||||||||||||||||||||||||||||
Offset | Size | Description | |||||||||||||||||||||||||||
$22 | byte | Sonic: Special bitfield. Counting from the least significant bit:
You can add the hex values together to use multiple settings at once. Also notice that the first 3 bits (0-2) are used in the character object as a second routine counter. | |||||||||||||||||||||||||||
$28 | byte | Sonic: Seconds of air left. Usually $1E; it decrements every second while the player is underwater. Beeps on $18, $13, and $0E. Countdown starts on $0B. | |||||||||||||||||||||||||||
$2B | byte | Sonic: Unused | |||||||||||||||||||||||||||
$30-$31 | word | Sonic: Remaining invulnerability time. Starts at $0078 after Sonic is hit, and seems to decrement every frame until it reaches $0000. | |||||||||||||||||||||||||||
$32-$33 | word | Sonic: Remaining time of invincibility. | |||||||||||||||||||||||||||
$34-$35 | word | Sonic: Remaining time of Speed Shoes. | |||||||||||||||||||||||||||
$36 | byte | Sonic: Angle of ground at Sonic's front collision hot spot ($03 is "edge of ground") | |||||||||||||||||||||||||||
$37 | byte | Sonic: Angle of ground at Sonic's rear collision hot spot | |||||||||||||||||||||||||||
$39 | byte | Sonic: Unused. | |||||||||||||||||||||||||||
$3A-$3B | word | Sonic: Unused. | |||||||||||||||||||||||||||
$3C | byte | Sonic: Set if jumping. | |||||||||||||||||||||||||||
$3D | byte | Sonic: SST index of object currently being stood on. (multiply by $40 and add $D000 to get the object's address). | |||||||||||||||||||||||||||
Boss Variables | |||||||||||||||||||||||||||||
Offset | Size | Description | |||||||||||||||||||||||||||
$21 | byte | Hit counter. Number of hits it takes to defeat a boss. | |||||||||||||||||||||||||||
$30 | word | X position | |||||||||||||||||||||||||||
$38 | word | Y position | |||||||||||||||||||||||||||
$3E | byte | Number of times to flash when hit |