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 with this disassembly he created of Toejam and Earl using Disasm.exe (which I belive is part of Sega-asm.zip) with the arguments 'disasm -a -x' and since then we've been working to decipher and annotate all the code it contains.

Currently the disassembly was ran over the entire rom file meaning it contains nonsense created from disassembling data as code as well. Over time we will root these out and remove them.

ROM:
Key: Empty Space Game Dynamics Image Data

ROM Header Unknown
+/- Offset Length (hex) Opcode / Hexcode Instruction / ASCII Description
+
00000000-000001FF
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
+
00000200-0000028F
90
60FE 4AB9 00A1 ...
BRA       $00000200 ...
00000212 Load in A5 Address $00000290=Setup Values
Unknown
+
00000290-0000BB91
B901
8000 ...
OR.L      #$120000C0,-(A1) ...
Unknown
+
0000BB92-0000BB9D
0C
10BC 0003 ...
MOVE.B    #$03,(A0) ...
Set Toejam's and then Earl's lives on game start
+
0000BB9E-0002C52B
F4248
4A28 0001 ...
TST.B     $0001(A0) ...
Unknown
+
0002C52C-0002E72B
21FF
N/A
N/A
Image data
+
0002E72C-000FFDE6
D16BA
0000 0000 ...
OR.B      #$00,D0 ...
Unknown
+
000FFDE7-000FFFFF
219
FFFF FFFF FFFF ...
N/A
Empty space

RAM:
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.

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

Theme Park

ROM File: Theme Park (F) [!].bin

This game has so many different ports it is hard to keep track of them all. The Megadrive one is a good one although I must say playing on an emulator to allow you to save whenever you want sure is helpful. Hopefully these codes will be aswell!

Offset Length Useful Values Effect

Rom:
0 0 0 0
0 0 0 0
0 0 0 0

Savestate:
40D6-40D9 4 00000000-FFFFFFFF Changes the amount of research per month
49FA-49FB 2 0000-FFFF Changes the amount Entertainers get paid when hired
4910-4911 2 0000-FFFF Changes the amount Mechcanics get paid when hired
4926-4927 2 0000-FFFF Changes the amount Handymen get paid when hired
493C-493D 2 0000-FFFF Changes the amount Guards get paid when hired
EAF4-EAF7 4 00000000-FFFFFFFF Changes the amount of money
EAFC - EAFF 4 00000000-FFFFFFFF Changes the loan amount
EB26-EB29 4 00000000-FFFFFFFF Changes the parks value at auction time

Notes:

None


Downloads:

None

Mega-Lo-Mania

ROM File: Mega Lo Mania (E) [c][!].bin

If you want the exact same ROM I have used search for "Mega Lo Mania (E) [c][!]"

Offset Length Useful Values Effect

Rom:
1248E - 1248F 2 00FF/6002 Change from 00FF to 6002 to give infinite men.
15C5E - 15C5F 2 0000-FFFF Stores the amount of men you start the game with.

Savestate:
0 0 0 0
0 0 0 0
0 0 0 0

Notes:
None
Downloads:
None

Toejam and Earl

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

The disassembled source code to Toejam and Earl on the Sega Megadrive, my favourite game on my favourite console.

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

Current State (Last updated - 16 Jul 2018)

It has become apparent that storing the entire source code to the game on this single web page is an unrealistic plan! And even if it was realistic it certainly isn't the optimal way to store or share it. So instead this page just contains a few snippets of the disassembled source code that I find (and think you will find) particularly interesting along with a brief summary of my current goals and priorities.

Eventually, when I'm at a point that I am happy to release the source, a GitHub repository or similar will be set up to hold it and the details for it will appear here.

If you are interested in reading more about the 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 not. 00 means it's not, 01 means it is.

History

Back in October 2015 I was contacted by a fellow Toejam and Earl fan going by the name of Juan Perez. Juan had created what he believed to be a disassembly of Toejam and Earl by running the original ROM file through a program called Disasm.exe (which I beleive is part of Sega-asm.zip). The disassembly, having been ran over the entire ROM file, was pretty messy containing a lot of nonsense code as a result of disassembling data (images, music, sound effects, etc) as if it were code, however, it was enough to peak my interest as a fun, interesting, long-term project.

Since then I've been working to turn this disassembly into a fully assemblable, editable and commented source code.

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 respective authors (listed in order of discovery):

Screenshots

Nothing to see here at the moment.

Want To Know More?

If you want to know more about this project you can email me using the details in the contact page or drop by my dedicated topic on Romhacking.net.

Downloads

T.E.S.S.E. Toejam and Earl SaveState Editor created by me in VisualBasic.Net back when I was first learning about ROM hacking. Easy to use, lets you edit inventory and stats using simple menus. Screenshot of T.E.S.S.E

Mega Bomberman

ROM File: Mega Bomberman (JUE) [!].bin

I loved this game when I was little and still do! Although the one player levels get a little boring after several play throughs so I may look into making a level editor for this at some point.

Offset Length Useful Values Effect

Rom:
0 0 0 0
0 0 0 0
0 0 0 0

Savestate:
C89F-C8A1 3 000000-FFFFFF Changes the value of the timer
C8BA 1 00-FF Changes special abilities through bit flags.(See note 1)
C8BB 1 00-FF Amount of hits it takes to kill P1
C8D6 1 00-08 P1 character in Battle Mode
C8D8 1 00-FF P1 explosion size
C8DA 1 00-FF P1 amount of bombs

Notes:

Note 1:

01 = Speed Up 1 10 = Kicker
02 = Speed Up 2 20 = Walk Through Bombs
04 = Detonator 40 = Walk Through Walls
08 = Lay All 80 = Invincibility

To have more than one simply add them together and enter that value (eg. 04+08+20=2C).


Downloads:

None