It is currently Fri Aug 17, 2018 2:04 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Decompiling/recompiling
PostPosted: Thu Jan 04, 2018 10:23 am 
Offline

Joined: Mon Feb 23, 2015 8:05 pm
Posts: 25
I have been looking for a good decompiler for nes roms.
Is there a reliable decompiler that produces assembler code that can be recompiled without much problems?

My target is to decompile fds games adapt them and recompile them to cartridge roms.
I know this is not as easy as it sounds but I'm interested in having a look at it.


Top
 Profile  
 
PostPosted: Thu Jan 04, 2018 11:16 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7391
Location: Seattle
I have been reasonably pleased with bisqwit's nescom's clever-disasm.

BUT: It can't load FDS files. And it still requires a fair amount of manual assistance.


Top
 Profile  
 
PostPosted: Thu Jan 04, 2018 7:21 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 4066
It is possible to hack FDS games into cartridge games as long as you get the memory map correct.
FDS games map code at 6000-DFFF, then the FDS BIOS lives at E000-FFFF.

For games that do not need to load, you can copy the 6000-7FFF bank into WRAM at bootup, copy the reset/nmi/irq vectors to FFFF, then jump to the reset vector.

The pirate mapper 42 was designed for this task as it gives a swappable bank at 6000.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Thu Jan 04, 2018 7:43 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7391
Location: Seattle
There have been a whole bunch of different pirate carts made for FDS ports. Not all of them are shaped like mappers 40/42/50.

Per FCEUX's source, iNES mapper 103 and UNIF MAPRs KS7030, KS7031, KS7037, KS7057, LE05, LH01, LH53, and MARIO1-MALEE2 are other shapes that have been used.


Top
 Profile  
 
PostPosted: Thu Jan 04, 2018 7:47 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6596
Location: Canada
At least when disassembling FDS files, there's convenient data in the disk format about where every PRG block should be addressed. ;)


Top
 Profile  
 
PostPosted: Thu Jan 04, 2018 9:48 pm 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 511
http://csdb.dk/release/?id=149429

IF you want to search for others its Dissasmebly not decompile, the code is not being converted back into a high level language. Although there are decompilers out there.


Top
 Profile  
 
PostPosted: Mon Jan 22, 2018 5:02 am 
Offline

Joined: Mon Feb 23, 2015 8:05 pm
Posts: 25
Thanks for all the help.
Right now the project is not my priority anymore but I'm probably going to have a look at it in the future.

@Oziphantom:
Thank you for that out to me. Somehow I always mixed those two up.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group