Is there a tutorial on how to use da65?

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
Albert1983
Posts: 14
Joined: Tue Aug 04, 2020 6:34 pm

Is there a tutorial on how to use da65?

Post by Albert1983 » Sun Nov 29, 2020 9:51 am

Good Morning.

I want to decompile a NES ROM, but I don't know how...
I got the da65 program, but I don't know how to use it...
Will there be a tutorial to use it?

User avatar
dougeff
Posts: 2821
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Is there a tutorial on how to use da65?

Post by dougeff » Sun Nov 29, 2020 10:37 am

First I would separate the different parts of the ROM with a hex editor. Remove the header. Make the CHR ROM its own file.

Then split the PRG ROM into different banks, the size depends on which mapper you are using.

Then run the da65 on each PRG ROM bank.

The real trick is reassembling it. You need to create a configuration file (cfg) for the linker, which is highly dependent on the mapper the ROM uses.
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
rainwarrior
Posts: 8004
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Is there a tutorial on how to use da65?

Post by rainwarrior » Sun Nov 29, 2020 2:18 pm

If you want to use da65 effectively you should read about its "info" file format:

https://cc65.github.io/doc/da65.html#s4

There's no tutorial on it that I know of. I did use it for a StarTropics modification project of mine, and I left the disassembly info with it as an example: StarTropics musix fix

With the info file you don't actually need to separate the PRG into banks, you can define segments in the info file instead.

User avatar
Albert1983
Posts: 14
Joined: Tue Aug 04, 2020 6:34 pm

Re: Is there a tutorial on how to use da65?

Post by Albert1983 » Sun Nov 29, 2020 5:44 pm

dougeff wrote:
Sun Nov 29, 2020 10:37 am
First I would separate the different parts of the ROM with a hex editor. Remove the header. Make the CHR ROM its own file.

Then split the PRG ROM into different banks, the size depends on which mapper you are using.

Then run the da65 on each PRG ROM bank.

The real trick is reassembling it. You need to create a configuration file (cfg) for the linker, which is highly dependent on the mapper the ROM uses.
I already split the ROM...
Now how I create the configuration file (cfg).

Post Reply