Emulator with disassembly capability

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
SusiKette
Posts: 147
Joined: Fri Mar 16, 2018 1:52 pm
Location: Finland

Emulator with disassembly capability

Post by SusiKette »

If one doesn't exist yet, I was thinkin of making one. Basically you play the game and it logs stuff and when you are ready you can disassemble the ROM. Some basic features that are needed probably are:
  • Code/data logger
  • Address/lable logger
  • Branch logger
  • Basic debugger
  • Hex editor
The branch logger could detect branch instructions where both options haven't been taken and use it to log more code. Of course this has to detect cases where one option is forced (branch always cases).

Are there other features that would be needed and cases that could cause incorrect disassembly if not handled correctly?
Avatar is pixel art of Noah Prime from Astral Chain
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: Emulator with disassembly capability

Post by Zepper »

Short answer: yes, a lot of them. Nintendulator, Mesen (most active), puNES...

My emulator:
- yes, it has code/data logger, but it's disabled due to the huge files generated, so viewing-only decompiled code is supported.
- yes, it has a way of patching any address once you determine it by reading decompiled code.
- Basic debugger? Mine hasn't.
User avatar
never-obsolete
Posts: 411
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ
Contact:

Re: Emulator with disassembly capability

Post by never-obsolete »

Zepper wrote: Thu Dec 24, 2020 3:48 pm - yes, it has code/data logger, but it's disabled due to the huge files generated, so viewing-only decompiled code is supported.
What's in the file that causes it to be so large?
. That's just like, your opinion, man .
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Emulator with disassembly capability

Post by tepples »

A code and data log (CDL) is usually the same size as the ROM file. A trace logger, by contrast, makes huge files because every instruction appears in the log as many times as it was executed. For (say) a wait-for-vblank loop, this will be quite a few.
User avatar
SusiKette
Posts: 147
Joined: Fri Mar 16, 2018 1:52 pm
Location: Finland

Re: Emulator with disassembly capability

Post by SusiKette »

I don't remember mesen having a disassembly feature (unless it was added just recently). I don't mean disassembly as in begin able to see the code in the debugger. I mean it as in disassembling the code into text files (and maybe chr and dmc files too).
Avatar is pixel art of Noah Prime from Astral Chain
Post Reply