View Single Post
Old 07-04-2005, 09:08 AM   #1
Junior Member
Join Date: May 2005
Posts: 8
Default 65816 Disassembler

Now don't get your hopes up, disassemblers were never meant to fully decompose a rom with the push of a button. Tracers can do that to an extent, but they don't encapsulate routines like C would. What I'm working on is meant to be a clear and superior alternative to console apps written for the same purpose - it's intended to take a routine in the file and encapsulate it.

EDIT: for those of you who like pictures:

It currently already works quite well, with the following features:

-Linear Tracing (right now it just goes from top to bottom)

-Autogenerates english labels with a variety of preset names, "ALPHA", ..., "MAGUS", etc...

-has a number of failsafes including
1. will alert you if it detects a BRK or COP instruction. These instructions are quite rare, and about 100% of the time signal an error on your part in choosing boundaries for disassembly or initial settings.

2. does an analysis of branch destinations, and will determine if they are misaligned (that's very bad). That means one of your branches goes to something that has determined to not be an opcode.

3. saves you time by determining if there are branch destinations to the end of the region you are trying to disassemble. (examples of this will be in the help file, whenever I get around to making it, with pictures).

-selectable initial 16-bit accumulator or X/Y registers.

-support for 512 byte headers

With all the above options it is already better than any existing disassembler I have seen, including the one in Geiger's Debugger. And there's probably other diagnostic messages I cant' remember atm.

Here's a list of features I'm currently working on adding and improving, straight out of my .cpp file:

List of things to add:

1. Save user preferences, possibly add the ability to hide the application, and other Gui niceties.
-probably want to use a file to store settings.

2. -Warning on unconditional Program Counter changes without following branch
-Option to include "Alternate Entry Point" labels
-Generally I have decided not to accept the notion of routines
with internal data, though some of my manually typed disassembly may
allow this, I no longer do it

*complete* 3. Conversion from Linear to Dynamic Tracing - outpuf buffer and many other things will have to be

4. Calculation of in rom addresses for JSR, JSL, and branch operations with no internal labels.
-Note, LoRom, HiRom, and FastRom should be specified as needed

5. Streamline spacing of operations to save time in various things.

6. Jump table generation - with conversion to Rom addresses
-Absolute Linear
-Long Linear
-Absolute Indexed
-Long Indexed

7. Possibly generate (i.e. rip from the rom) data tables with specified types of spacing

8. Handle RTF API to generate colorized text

9. Reconfigure the maskbits array and create new ones to store branch destination and source information.
-incorporate data concerning register width at each particular opcode.

10. *optional* add support for PHP and PLP and stack balancing diagnostics. not sure if I need that and it would probably get pretty complicated with more hairy routines.

Ok, so I'm looking for suggestions and input, as well as some Beta Testers.
MathOnNapkins is offline   Reply With Quote