News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: How to disassemble a Genesis rom ?  (Read 4539 times)

tryphon

  • Hero Member
  • *****
  • Posts: 722
    • View Profile
How to disassemble a Genesis rom ?
« on: July 06, 2013, 11:55:56 am »
Hi,

I was wondering how you could disassemble a Genesis ROM the best way. I mean : I can use any 68000 disassembler (I suppose there are plenty of them), but I wonder if there are some that use the infos in the ROM file (especially the header) to organize the code the best way.

I know IDA Pro does a pretty good job, but it's damn expensive  :o. The free version doesn't seem to handle 68000.

If you have some hints about that, I'd be grateful :)

FAST6191

  • Hero Member
  • *****
  • Posts: 3052
    • View Profile
Re: How to disassemble a Genesis rom ?
« Reply #1 on: July 06, 2013, 04:09:24 pm »
For the record the megadrive/genesis also has a Z80 used as a sound core (though it can reach out and touch the rest of the system if it has to). On top of that as with all pre/non filesystem using setups you can find actual useful parts of the binary here, there and everywhere or indeed I suppose it is technically possible to find 68K code in the RAM depending upon the game (speed wise, cart being memory mapped, lack of writable memory wise and a general lack of bankswitching means I would not bet heavily on each and every game doing it but it is possible and not all that bad an idea, it is how the Z80 works as well).

Here is where I would probably share a trick like the one for the GBA to find its binary but I am afraid I do not really have one for the megadrive/genesis. Some games will have checksums for various things, you try watching one of these but just as often it could be for everything or no machine code at all.
That said the usual tricks of "watch the bootup and after the I/O is done you probably have your interesting stuff" and "wait until it is in the game and you probably have a general idea of where things are" (again it can and is not unreasonable to skip around everywhere) work well enough. There may well be a trick but I do not know it; I am not the best megadrive/genesis by any means and when I do play with it I tend to be more focused on a given thing (single functions and tracing guided) and not just general disassembly.

Likewise the Z80 code is typically copied to the Z80 by the 68000 (take your pick on methods) via a known sequence (BUS REQ ON followed by BUS RESET OFF is how the main manual deals with it) so you could trace that way for the Z80.