Jump to content
IGNORED

distella enhancement


SpiceWare

Recommended Posts

I'm helping espire8 on a hack and ran Eggomania thru distella using:

./distella -a em.bin > em.asm

and got this *:

original_em_asm.txt

lots of DATA, not much code :(

 

I started a config file denoting the CODE sections and right away came across a jump table for the PHA PHA RTS trick of jumping to different routines. None of the code jumped to via the table was being disassembled. In reading over the docs for distella I noticed that besides the normal RESET vector, you could also tell it to trace out the BRK vector. I thought it would be useful to add a list of known code starting points to the config table, so I modified the source to include a TRC option to start TRaCing code at a given point. I created a config file like this:

; F283 - F2A7 is a jump table for F2c9 - push (address -1) to stack, then RTS
; TRaCe the JUMP TABLE
TRC F4FB; $FA $F4
TRC F536; $35,$F5
TRC F543; $42,$F5
TRC F554; $53,$F5
TRC F543; $42,$F5
TRC F350; $4F,$F3
TRC F543; $42,$F5
TRC F2D6; $D5,$F2
TRC F4EE; $ED,$F4
TRC F39D; $9C,$F3
TRC F424; $23,$F4
TRC F477; $76,$F4
TRC F515; $14,$F5
TRC F2D6; $D5,$F2
TRC F543; $42,$F5
TRC F31E; $1D,$F3
TRC F543; $42,$F5
TRC FFE7; $E6,$FF
TRC F000; must add ORG last for some reason...
;
GFX FA83 FA89; egg

and got the following, which was much more useful *:

em_asm.txt

 

This is my modified version of distella.c *

distella_c.txt

 

The only issue I ran across was if you use the TRC command then you need to add the ORG ($F000) as the very last TRC command or the wrong ORG will be used. All changes can be found by searching for DGS. I also added a comment token to the config file to supress the "invalid line - ignored" messages. Comments must start with ;<BLANK> as shown in my sample config file above.

 

* NOTE: I renamed all files from filename.ext to filename_ext.txt so I could upload them.

Edited by SpiceWare
Link to comment
Share on other sites

  • 6 months later...
This is my modified version of distella.c *

Could you post a DOS/Windows executable of it?

 

Also, am I the only person who uses DIS6502 to disassemble 2600 ROMs? The thing I like about it is that it's interactive. For example, you can highlight a section that disassembled as BYTEs, and flag it as code, and it will change into code. Or you can change a DIS6502-generated label into a more meaningful name, and it will change throughout the code. Or, if you click on a label, DIS6502 will show you everywhere the label is used.

 

Michael

Link to comment
Share on other sites

Could you post a DOS/Windows executable of it?

I'm on a Mac.

 

Were these changes based on 3.0?

Yep, the change for this was pretty short too

/* added to TRaCe a known code address. */
	} else if (!strcmp(cfg_tok,"TRC")) {
		offset = cfg_beg;
		addressq=addq(addressq,offset);

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