4 ms·
I'd love to do something like this for various NES games. Can Ghidra hook up to some NES emulators?
by samwestdev 6y ago
I'd love to do something like this for various NES games. Can Ghidra hook up to some NES emulators?
- mikepurvis 6y agoI expect you'll have a tougher time there because NES games were written directly in assembler, so there won't be the characteristic patterns that a decompiler can use to recognize particular control flows— I believe C wasn't really standard until the N64 era, which was part of what made high-level emulation (see: UltraHLE) possible. On the other hand, hand-authored assembly is easier to read directly, because, of course, it was written and read in that form originally anyway!
- bluesign 6y agoStill bankswitching etc will cause a lot of problems for disassembler. Best option for NES is to use emulator debugger for sure.
- tom_ 6y agoGhidra didn't do a great job of 6502 when I tried using it a couple of years ago, due to poor support for a couple of the 6502's addressing modes, but maybe it's improved? This Github bug summarises the problem I was having with it: https://github.com/NationalSecurityAgency/ghidra/issues/201 https://github.com/NationalSecurityAgency/ghidra/issues/201
- g051051 6y agoThe version 9.2 release notes mention improvements to the 6502 processor specification: > Many improvements and bug fixes have been made to existing processor specifications: ARM, AARCH64, AVR8, CRC16C, PIC24/30, SH2, SH4, TriCore, X86, XGATE, 6502, 68K, 6805, M6809, 8051, and others. Perhaps it's better for your use case now?
- jhatemyjob 6y agoyou dont need Ghidra for that
- corysama 6y agoThe Displaced Gamers' "Behind the Code" series does stuff like this for NES games. I don't know they exact tech they use. I think it's basically emulators with debugging features. https://www.youtube.com/playlist?list=PLn5sTGew1WGD2Tnspn9vhpLGf-kqDRbYy https://www.youtube.com/playlist?list=PLn5sTGew1WGD2Tnspn9vh...