Jump to content
IGNORED

Disassembling 8K (or larger) 2600 games.


Rhindle The Red

Recommended Posts

quote:

Originally posted by Rhindle The Red:

Is there a means to do this?

 

DiStella will only handle 2K and 4K ROMs, yet I know it's been done.


It is possible, but requires some extra work.

 

First you have to split your binary into pieces of 4K. (I'm using Windows Commander, but there are lots of other tools that can do so too)

 

Then you should try to disassemble the first 4K file. There will be large blocks of data, because those blocks are only accessed via the other bank(s) and DiStella fails recognizing them as code. You'll need a configuration file (see DiStella.txt). Start with:

ORG F000

CODE F000 FFF9

 

In the resulting file, look at the adresses (e.g. JMP, JSR) and you should be able to recognize the real ORG address. Update!

 

Try to locate blocks, that look not like code (e.g. containing JAM, BRK or illegal opcodes) and adjust the configuration file.

 

As long as there are unknown labels (e.g. Lf123 = $f123) at the start of the output file, there is something wrong. You have to iterate

 

Repeat with the other 4K files.

 

When you are finished doing all that, replace all ORG with RORG and add before new ORGs which must increase in $1000 steps (e.g. $1000, $2000,...). Remove everything before ORG. Now you should copy all files together and add the following lines at the begin of the file:

 

processor 6502

include vcs.h

 

This should compile and you should compare the result with the original. There will be most likely some differences:

- different values for TIA registers (e.g. CXCLR.. at $00.. or at $30..), they don't matter, but for perfection you might want to correct them too.

- incorrect word access to zeropage registers (eg. sta $0000 will be compiled as sta $00). This causes the complete code to get out of sync (starting at that point) with the original and you have to fix this (e.g. sta.w $00).

 

Repeat!

 

That's all!

 

BTW: I have made a lot of DiStella configuration files, tell me which game you want to disassemble. Perhaps I can help.

 

[ 02-13-2002: Message edited by: Thomas Jentzsch ]

Link to comment
Share on other sites

  • 3 years later...

 

BTW: I have made a lot of DiStella configuration files, tell me which game you want to disassemble. Perhaps I can help.

 

 

Do you have a config for Smurfs RIGC Disassembly? It's 8k and I can't seem to figure out how to cut the game in half for use with distella (or how to put it back togther cause when I half the .bin into 2 4k files I get lost form that point :(

Link to comment
Share on other sites

  • 5 months later...
Then you should try to disassemble the first 4K file. There will be large blocks of data, because those blocks are only accessed via the other bank(s) and DiStella fails recognizing them as code. You'll need a configuration file (see DiStella.txt). Start with:

ORG F000

CODE F000 FFF9

 

Actually, a better method than creating a preliminary .cfg is to use Distella's -d switch (i.e. "dumb" mode, which does the same thing...translates the entire contents as opcodes rather than data).

 

BTW, the high nybble of the START vector sometimes doesn't apply to the actual addresses in the game code...it just needs to be an odd-numbered value (in which case, all JMP's and absolute addresses would fail to be tagged). This result could happen whether or not a game is 8k). So if you notice a plethora of address equates up top, it could be due to the vector not sharing the same # for it's high nybble. For example, if the source code configured the address range as $B000-$BFFF...a start vector defined as $Fxxx would cause Distella to miss all of the tags (even though the rom itself would function fine). I've run across this problem in a 4k game rom before...but the name escapes me.

 

So the process should be: disassemble a segment using the -pafsd switches, check the disassembly file for address discrepencies & data ranges, create a .cfg file for the segment based on that, then finally use Distella to create the final version by using -pafscfilename.cfg switches.

Edited by Nukey Shay
Link to comment
Share on other sites

  • 6 months later...
  • 3 weeks later...

How about Asteroid, the one with copyright screen? I tried but I kind of get lost since I don't know enough ASM to correctly decode the entire file. I wanted to poke at the copyright screen and see its code for it. The data for the copyright screen is stored at 0A1 through A9B but I'm not sure where the screen route or the timer loop is.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...