Sonic Drift
From Sonic Retro
This article needs cleanup. This article needs to be edited to conform to a higher standard of article quality. |
Bellow are some notes for Sonic Drift. These notes are based on Ravenfreak's research.
Contents
Error Handler
This game has a hidden error handler text located at offset $46350. Whenever the game crashes it will display this error text before returning to the Sega screen. The error handler routine is located at offset $462CF.
SRAM
It should be noted that this is the only 8-bit Sonic title to utilize battery back up. The game keeps track of the player's best times in Free Run Mode. The SRAM read/write code is located at offset $8F5 in the ROM.
Object Pointers
Offset | Description |
---|---|
$70AA | Ring |
$70AD | Palm Tree Left |
$70B0 | Palm Tree Right |
$70B3 | Stone Pillar Left |
$70B6 | Stone Pillar Right |
$70B9 | Spring Yard Block Left |
$70BC | Spring Yard Block Right |
$70BF | Labyrinth Block Left |
$70C2 | Labyrinth Block Right |
$70C5 | Lamppost Left |
$70C8 | Lamppost Right |
$70CB | Electrical Sphere Left |
$70CE | Electrical Sphere Right |
$70D1 | Booster |
$70D4 | Invincible Power Up |
$70D7 | Spring |
$70DA | Spike Ball |
$70DD | Heart |
$70E0 | Sign Left |
$70E3 | Sign Right |
Art
All art in the ROM can be edited in Aspect Edit. The player sprites are uncompressed and each sprite consits of 9 tiles that make up a 3x3 grid. The following diagram shows the tile rearrangement data for their sprites:
[1] [2] [3] [4] [5] [6] [7] [8] [9]
Each map in the game consists of 80 tiles that make up a 8x10 grid. The tile arrangement is as follows:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11][12][13][14][15][16][17][18][19][20] [21][22][23][24][25][26][27][28][29][30] [31][32][33][34][35][36][37][38][39][40] [41][42][43][44][45][46][47][48][49][50] [51][52][53][54][55][56][57][58][59][60] [61][62][63][64][65][66][67][68][69][70] [71][72][73][74][75][76][77][78][79][80]
Level background sprites are compressed. However, the title arrangement is different than the maps. Further research is needed to fully understand the tile arrangement data at this time.
Art Offsets
Offset | Description |
---|---|
$87E7-$9436 | Small Text Sprites (Compressed) |
$9B3F | Marble Red Map (Compressed) |
$A1FA | Spring Yard Red Map (Compressed) |
$A954 | Labyrinth Red Map (Compressed) |
$B072 | Star Light Red Map (Compressed) |
$B74F | Scrap Brain Red Map (Compressed) |
$D33C | Spring Yard Block (Compressed) |
$D4B9 | Labyrinth Block (Compressed) |
$D63F | Star Light Lamppost (Compressed) |
$D724 | Scrap Brain Electric Orb (Compressed) |
$D882 | Green Hill Green Map (Compressed) |
$DFA1 | Marble Green Map (Compressed) |
$E660 | Spring Yard Green Map (Compressed) |
$20000 | Sonic Player Select Sprites |
$212DF | Tails Player Select Sprites |
$22BE0 | Eggman Player Select Sprites |
$23220 | Amy Player Select Sprites |
$258C0 | Green Hill Yellow Map (Compressed) |
$25F56 | Marble Yellow Map (Compressed) |
$2661F | Spring Yard Yellow Map (Compressed) |
$26D6B | Labyrinth Yellow Map (Compressed) |
$27484 | Star Light Yellow Map (Compressed) |
$2C000 | Labyrinth Green Map (Compressed) |
$2C797 | Green Hill Background (Compressed) |
$2CFD9 | Marble Background (Compressed) |
$2D262 | Spring Yard Background (Compressed) |
$2D6A1 | Labyrinth Background (Compressed) |
$2DBFA | Star Light Background (Compressed) |
$2E244 | Scrap Brain Background (Compressed) |
$34000 | Tails Uncompressed Sprites |
$34C40 | Amy Uncompressed Sprites |
$35880 | Eggman Uncompressed Sprites |
$36500 | Sonic Thumbs Up Sprite |
$36660 | Eggman Fist Pump Sprite |
$367E0 | Tails Peace Sign Sprite |
$36940 | Amy Waving Sprite |
$38AC0 | VS. Text Sprites (Compressed) |
$38BEF | Title Card Text Sprites (Compressed) |
$3BC4F | Sega Logo (Compressed) |
$4339B | Labyrinth Title Card Text (Compressed) |
$45A5C | Cursor on Menu Screen Sprite (Compressed) |
Palettes
Offset | Description |
---|---|
$2131 | Green Hill |
$2151 | Sonic/Blue Traffic Light |
$2171 | Marble |
$2191 | Spring Yard |
$21B1 | Labyrinth |
$21D1 | Star Light |
$21F1 | Scrap Brain |
$3888 | Track Rotating Palette |
$45ABF | Green Hill Course Select |
$45AFF | Marble Course Select |
Text
The text used on various screens can be edited via a hex editor. Each letter consists of two hex values, one representing the top of the letter, one representing the bottom. See Green Hill's text bellow for an example, the top of the letter is represented with a 1, while the bottom is represented with a 2 in the example:
GT RT ET ET NT HT .db $00 $00 $46 $00 $4B $00 $2E $00 $2E $00 $47 $00 $00 $00 $41 $00 IT LT LT GB RB EB EB .db $42 $00 $45 $00 $45 $00 $00 $00 $50 $00 $5B $00 $3E $00 $3E $00 NB HB IB LB LB .db $57 $00 $00 $00 $51 $00 $52 $00 $55 $00 $55 $00
The text on the title cards follow a slightly different pattern, and the value for the letter "G" different. Each title card text consits of 96 bytes. The first two bytes determine the mappings' x and y positions on the screen. The last two bytes determine the letter mappings, the first byte is the top of the letter while the second byte is the bottom. Labyrinth uses both a compressed sprite and hex array for it's name. However, you can still easily edit the name as it follows the same format as the other track names. Here's Green Hill's Title Card Text:
"ROUND" Mappings, this is always the first line of text that displays and therefore appears before the actual track's name.
X Y RT X Y RB X Y OT X Y OB X Y UT X .db $3E $F0 $4B $46 $F0 $5B $3E $F8 $48 $46 $F8 $58 $3E $00 $4E $46 Y UB X Y NT X Y NB X Y DT X Y DB .db $00 $5E $3E $08 $47 $46 $08 $57 $3E $10 $2D $46 $10 $3D Round Number Mappings (in this case it's 1) X Y 1T X Y 1B .db $3E $20 $82 $46 $20 $92
Unlike the mappings used on the results screen, the top and bottom of each letter appear in two bytes, each next to each other. See bellow:
X Y X Y .db $5E $00 $40 $66 $00 $50 G .db $5E $08 $4B $66 $08 $5B R .db $5E $10 $2E $66 $10 $3E E .db $5E $18 $2E $66 $18 $3E E .db $5E $20 $47 $66 $20 $57 N .db $6E $10 $41 $76 $10 $51 H .db $6E $18 $42 $76 $18 $52 I .db $6E $20 $45 $76 $20 $55 L .db $6E $28 $45 $76 $28 $55 L .db $6E $30 $00 $76 $30 $00
Text Offsets
Offset | Description |
---|---|
$15FEF | SONIC Text on GP Results Screen |
$160B3 | TAILS Text on GP Results Screen |
$16177 | AMY Text on GP Results Screen |
$1623B | EGGMAN Text on GP Results Screen |
$43445 | Green Hill Title Card |
$434A5 | Marble Title Card |
$43505 | Spring Yard Title Card |
$43565 | Labyrinth Title Card |
$435C5 | Star Light Title Card |
$43625 | Scrap Brain Title Card |
$4BCA1 | Green Hill Grand Prix Results |
$4BCCD | Marble Grand Prix Results |
$4BCF9 | Spring Yard Grand Prix Results |
$4BD25 | Labyrinth Grand Prix Results |
$4BD51 | Star Light Grand Prix Results |
$4BD7D | Scrap Brain Grand Prix Results |
$4AF3C | Green Hill Free Run Results |
$4AF68 | Marble Free Run Results |
$4AF94 | Spring Yard Free Run Results |
$4AFC0 | Labyrinth Free Run Results |
$4AFEC | Star Light Free Run Results |
$4B018 | Scrap Brain Free Run Results |
$4B170 | Green Results Text |
$4B18C | Yellow Results Text |
$4B1A8 | Red Results Text |
Letter Values
Offset | Description |
---|---|
$00 | Space/End of Line |
$2A | Top of A |
$3A | Bottom of A |
$2B | Top of B |
$3B | Bottom of B |
$2C | Top of C |
$3C | Bottom of C |
$2D | Top of D |
$3D | Bottom of D |
$2E | Top of E |
$3E | Bottom of E |
$2F | Top of F |
$3F | Bottom of F |
$40 | Top of G (Title Card Text) |
$46 | Top of G (Results Text) |
$50 | Bottom of G |
$41 | Top of H |
$51 | Bottom of H |
$42 | Top of I |
$52 | Bottom of I |
$43 | Top of J |
$53 | Bottom of J |
$44 | Top of K |
$54 | Bottom of K |
$45 | Top of L |
$55 | Bottom of L |
$46 | Top of M |
$56 | Bottom of M |
$47 | Top of N |
$57 | Bottom of N |
$48 | Top of O |
$58 | Bottom of O |
$49 | Top of P |
$59 | Bottom of P |
$4A | Top of Q |
$5A | Bottom of Q |
$4B | Top of R |
$5B | Bottom of R |
$4C | Top of S |
$5C | Bottom of S |
$4D | Top of T |
$5D | Bottom of T |
$4E | Top of U |
$5E | Bottom of U |
$4F | Top of V |
$5F | Bottom of V |
$60 | Top of W |
$70 | Bottom of W |
$61 | Top of X |
$71 | Bottom of X |
$62 | Top of Y |
$72 | Bottom of Y |
$63 | Top of Z |
$73 | Bottom of Z |
Track Layouts
The track layout pointers are located at offset $361C. The first track is Green Hill Green which is located at offset $1D6A0, followed by Marble Green and so forth. Note that you'll need to edit each track map as well as the object layout for them to match your updated tracks. Each part of the track consists of three bytes. The first byte controls the background movement, while the second and third bytes are the actual track layout. Further research is needed in order to make edits to the track layouts.
Offset | Description |
---|---|
$1D6A0 | Green Hill Green |
$1D6D0 | Marble Green |
$1D71A | Spring Yard Green |
$1D76E | Labyrinth Green |
$1D7C4 | Star Light Green |
$1D80E | Scrap Brain Green |
$1D859 | Green Hill Red |
$1D8AA | Marble Red |
$1D908 | Spring Yard Red |
$1D944 | Labyrinth Red |
$1D99A | Star Light Red |
$1D9DC | Scrap Brain Red |
$1DA47 | Green Hill Yellow |
$1DA8B | Marble Yellow |
$1DACF | Spring Yard Yellow |
$1DB0E | Labyrinth Yellow |
$1DB72 | Star Light Yellow |
$1DBC9 | Scrap Brain Yellow |
Music
Music Pointers are located at offset $7D473 in the ROM. The sound effect pointers are located at $7D491.
Music Locations
Offset | Description |
---|---|
$7D4D1 | Options |
$7D625 | Title Screen |
$7D6EE | Green Hill |
$7D940 | Course Select With Intro |
$7DB6E | Spring Yard |
$7DD79 | Labyrinth |
$7DF7D | Star Light |
$7E15A | Scrap Brain |
$7E494 | Race Results |
$7E511 | GP Final Results |
$7E5CC | Invincibility Theme |
$7E6B4 | Credits |
$7E838 | Marble |
$7E9F7 | Course Select With No Intro |
References
Sonic Drift | |
---|---|
Manuals |
show;hide
|