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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - minion

Pages: [1]
Programming / Disassembly + Re-assembly of NES roms
« on: July 19, 2020, 03:33:07 am »
Hello all! I'm new to the community and have been dabbling in some disassembly of NES games as a learning tool. First, thanks to everyone who has shared their approaches with the community over the years.  I spent a couple days reading just about every result returned by Google and forum searches here and in the nesdev forums, but didn't find much (other than this thread where horst mentions using IDA, which I fear is out of the reach for most in the community).

I was sort of surprised at how difficult of a time I was having getting just a basic disassembly / reassembly process going. After looking through a few of the commonly suggested toolchains, I settled on ca65 as it seems mature and has reasonable integration points with mesen. Plus I think Disch's FF disassembly has a pretty nice organizational template to go off of with respect to structuring the code in 'banks', building a ld65 memory map config file and disassembly labeling info file. (Shoutout to Disch for sharing that, by the way.  That clearly took a huge amount of work and is a very cool contribution to the community!)

So, It looks like I'm going to need to bang out a few python scripts to get to the point where getting from rom w/ CDL file to reassemble-able source is a reliable, repeatable process.  All I'm looking to produce is a set of source files with auto-generated labels and asset blobs replicated as bytes/bins, to be used as a starting point for labeling and stepping through code in a debugger.  It looks like a bunch of people have cobbled together parts of this, but there's not much out there that isn't quite specific to the game they were hacking on at the time.

I just wanted to drop a post here to make sure I haven't missed anything out there that could save me some time before I dump a couple weeks into this.  Please reply and let me know if I did!  Cheers and beers.

(Appendix: Here are a few of the links I read through to gather info for this post)
one of the most interesting, although I'm not trying to get get too deep into "smart" disassembly, just baseline 'reasseble-able' code ->

Pages: [1]