Nintendo 6502 dissasembler by Brandon Tallent Reference: 1.......Intro 2.......Usage 3.......Thanks & Contact 4.......Version History 5.......Future Plans --------------------------------------------------------------------------- 1....Intro..... This program is designed to rip apart your favorite NES game so you can steal the code and use it yourself ;) Nesdasm automatically comments the code for you, although right now it's not implemented for all instructions. It also doesn't comment the NES CPU and PPU registers yet, although this is planned for a future version. It is specifically written to dissassemble 8 bit NES games, and it probably wont work for standard 6502 asm files without the iNES header, since nesdasm interprets the first 16 bytes of any file as the iNES header. Unfortunatly right now, Nesdasm doesn't work well on commercial games because I haven't figured out a good way to tell code from data, I'm working on this and hopefully in the next release it'll be fixed. If anyone has some neat algorithms or tips for doing this, I'd love to hear about them. All these bad things are nothing new though, no other 6502 dissasemblers can tell code from data either, and none of them comment the source. Also, the docs I have which explain the 6502 differ from each other, one gives slightly different opcodes then the other. I wrote some source and for the most part the instructions should all be correct, but if you see any obvious (or inobvious) bugs, please let me know. --------------------------------------------------------------------------- 2....Usage..... Nesdasm is a commandline program. To run it, simply type "nesdasm" at the dos prompt followed by some optional flags and the file to dissasemble. It is also possible to make the output of Nesdasm go to a file. See below for how to do this. nesdasm [-s] [-p] filename.nes optional flags: -s: Skip iNES header. This is a temporary little thing, since the iNES header code is still a little buggy ;) -p: Pause after each instruction. This is useful if you're displaying the output on screen, and you want to study each instruction as it comes up. examples: nesdasm -s junkdemo.nes nesdasm -p c:\nesticle\dragwar.nes nesdasm -s -p finalf.nes If you'd like to make the output from Nesdasm go to a file, use '>' followed by the filename. I.E. nesdasm junkdemo.nes > junkdemo.asm This lists the code from junkdemo.nes in the file junkdemo.asm --------------------------------------------------------------------------- 3....Thanks & Contact..... Thanks goes out to a lot of people I've never spoken with before, for writing the various docs which I used for this program: Jeremy Chadwick............nestech.txt, TRaCER RTK........................6502guid.txt, 6502sum.txt VmprHntrD..................neshdr20.txt Zophar and the staff at Zophars Domain for providing an excellent emu site for me to leach info from :) Happy303 for giving me the idea of doin' some emu stuff and being a great friend. Crono` and Class for giving me a ton of help with C everyone in #trax for talking about masturbation & sex 24/7 ;) email: apester000@aol.com IRC: Brandon- in #trax, EFnet --------------------------------------------------------------------------- 4....Version history..... 2.13.99: Initial release [v 0.5] --------------------------------------------------------------------------- 5....Future plans..... -distinguish code from data so this util is actually useful ;) -comments for NES specific registers (PPU and CPU) -labels -options for suppressing opcodes/comments -fix the header routine -allow compatibility with non-nes 6502 files