My Brill Game Site My Brill Game Site

Toejam and Earl

ROM File: Toejam & Earl (REV 00) (U) [!].bin

The memory map of Toejam and Earl on the Sega Megadrive, my favourite game on my favourite console.

I'm currently working on this game so some of the info will not be entirely accurate however it is constantly being refined.

Juan Perez originally contacted me in October 2015 with a disassembly he created of Toejam and Earl using Disasm.exe (which I belive is part of Sega-asm.zip) using the arguments 'disasm -a -x' and since then, despite not yet hearing from him again, I've been working to decipher and annotate all the code it contains.

The disassembly was ran over the entire ROM file meaning it contains nonsense code as a result of disassembling data (images, music, sound effects, etc) as if it were code. Over time I will root these out and remove them.

This page is really just for storing the results of the process and all the data that is discovered. To read more about the actual disassembling process itself head over to my dedicated topic on Romhacking.net.

A quick summary of my current priorities breaks down as follows (in roughly this order):

  • Presents related data (how do Rocket Skates work, what sets how long tomatoes last, etc).
  • Random map generation routine.
  • Enemy related data (A.I., sprites, attributes like health, speed, damage, etc)
  • Player (Toejam and Earl) related data (Health, speed, sprites, etc)
  • Everything else...

If there is anything you have a particular interest in let me know either on the comments here or on the RHDN topic and I'll see what I can find.

ROM (1MB, approx 4.62% deciphered):
Key: Empty Space Error Handling Game Dynamics Data Block Image Data General Routine ROM Header Unknown
+/- Offset Length (hex) Opcode / Hexcode Instruction / ASCII Description
+
00000-001FF
200
00FF 8000 0000 ...
.ÿ€.....
Standard rom header with the following details:
    Initial stack pointer value: 00FF 8000
    Entry Point: 0000 0202
    ROM Details: SEGA GENESIS    (C)SEGA 1991.JULTOEJAM & EARL TOEJAM & EARL GM MK-1020 -00
+
00200-00201
2
60FE
BRA       $00000200
1 line infinite loop, used for exceptions.
+
00202-0028F
8E
4AB9 00A10008 ...
TST.L     $00A10008 ...
Megadrive initialisation routine...
+
00290-002FB
6C
8000 3FFF 0100 ...
N/A
Setup values
+
002FC-00305
A
4A79 00C00004 ...
TST.W     $00C00004 ...
Game Entry Point.
+
00306-00321
1C
4E71 ...
NOP ...
Clear RAM Routine.
+
00322-0BB77
B856
8000 ...
OR.L      #$120000C0,-(A1) ...
Unknown
+
0BB78-0BC27
AB
207C 00FFA248 ...
MOVE.L    #$00FFA248,A0 ...
Sets Toejam and Earl's Starting Stats...
+
0BC28-2C52B
20901
4A28 0001 ...
TST.B     $0001(A0) ...
Unknown
+
2C52C-2E72B
21FF
N/A
N/A
Image data
+
2E72C-FFDE6
D16BB
0000 0000 ...
OR.B      #$00,D0 ...
Unknown
+
FFDE7-FFFFF
219
FFFF FFFF FFFF ...
N/A
Empty space

RAM (64KB, approx 1.00% deciphered):
Offset GENS Savestate Offset Length (hex) Original Value Useful Values Description
0000-A247 2478-C6BF A248 Mixed Unknown Unknown
A248 C6C0 1 03 00-09 Changes the amount of Toejam's lives.
A249 C6C1 1 03 00-09 Changes the amount of Earl's lives.
A24A C6C2 1 Unknown 00-?? Changes the amount of Toejam's cash.
A24B C6C3 1 Unknown 00-?? Changes the amount of Earl's cash.
A24C-A24D C6C4-C6C5 2 0000 0000-???? Changes Toejam's score.
A24E-A24F C6C6-C6C7 2 0000 0000-???? Changes Earl's score.
A250 C6C8 1 00 00-09 Changes Toejam's level.
(See note 1)
A251 C6C9 1 00 00-09 Changes Earl's level.
(See note 1)
A252-A297 C6CA-C70F 46 Mixed Unknown Unknown
A298-A29B C710-C713 4 Unknown ??-?? Toejam's health.
A29C-A29F C714-C717 4 Unknown ??-?? Earl's health.
A2A0-DA89 C718-FF01 37EA Mixed Unknown Unknown
DA8A-DAC1 FF02-FF39 37 00 00-01 Stores whether presents are identified or not.
(See note 3)
DAC2-DAE1 FF3A-FF59 1F 1B or FF 00-1B Stores Toejam and Earl's inventory.
(See note 2)
DAE2-DAF1 FF5A-FF69 10 Mixed Unknown Present 1 data.
DAF2-FFFF FF6A-123E2 250D Mixed Unknown Unknown

ADDITIONAL INFO:
Offset GENS Savestate Offset Length (hex) Original Value Useful Values Description
CRAM Maybe? (TBC) A622-A9FD 3DD Mixed Unknown Contains the level layout of the current level.
CRAM Maybe? (TBC) A9FE-ADD9 3DC Mixed Unknown Contains the level layout of level 1.
CRAM Maybe? (TBC) ADDA-B1B5 3DD Mixed Unknown Contains the level layout of level 2 while your on level 3.
CRAM Maybe? (TBC) B800-C6BF EBF Mixed Unknown Moving letter graphics.

Notes:

Note 1:

00 = Wiener 05 = Bro
01 = Dufus 06 = Homey
02 = Poindexter 07 = Rapmaster
03 = Peanut 08 = Funk Lord
04 = Dude 09 = Goner

Note 2:

00 = Icarus Wings 0A = Rootbeer 14= Extra Buck
01 = Spring Shoes 0B = Promotion 15 = Jackpot
02 = Innertube 0C = Un-fall (Togetherness in 2 player) 16 = Tomato Rain
03 = Tomatoes 0D = Rain Cloud 17 = Earthling
04 = Sling Shot 0E = Fudge Sundae 18 = School Book
05 = Rocket Skates 0F = Decoy 19 = BoomBox
06 = Rose Bushes 10 = Total Bummer 1A = Random
07 = Super Hitops 11 = Extra Life 1B = Bonus Hi Tops
08 = Doorway 12 = Randomizer FF = Empty
09 = Food 13 = Telephone  

Note 3:

These come it pairs with the value in the even offsets representing the present and the value in the following odd offset representing if it is identified or no. 00 means it's not, 01 means it is.

Credits and Thanks:

The following people and pages have been of great help during the completion of this project. Huge thanks to them and their repective authors (listed in order of discovery):

Downloads:
T.E.S.S.E. Toejam and Earl SaveState Editor created by me in VisualBasic.Net. Easy to use, lets you edit inventory and stats using simple menus.
Now works in single player!
Screenshot of T.E.S.S.E