10

I have a hobby project with an old CP/M-80 system, where I now would like to disassemble/decompile some compiled code – a ROM and some small executables – into assembly source so I can regenerate the exact same binary. I have an emulator running on macOS.

I have previously played a bit with REZ (the Z80 version of RESOURCE) which was nice but I was wondering if there are better tools now 30 years later running on modern equipment. IDA Pro supports Z80 and looks very powerful but the price is a bit higher than I’d like.

What should I have a look at?

1
  • Oh so many for the 6502. Mostly Javascript. I blame NES.
    – Brian H
    Jun 28 at 15:29
16

The old IDA freeware ver.3.7 supports Z80. It has a Turbo Vision style interface, which may be something that puts you off. It is also no longer distributed officially. However, it is very powerful, and if you can live with its quirks, you will be able to find it on many abandonware websites.

Alternatively, a lot of people started switching to NSA-developed Ghidra: https://ghidra-sre.org/. It is quite powerful, supports Z80, and is also free and open source. The only obvious downside to it is that it is a several hundred Mb download, vs. several megabytes of IDA free 3.7.

Interestingly, 8 years ago a closeely related question was asked over at Reverse Engineering StackExchange: "Is there any disassembler to rival IDA Pro?" Their answers are not specific to Z80, of course, but two interesting disassemblers mentioned there feature support for Z80 and may prove useful too. They are called radare2 and the Online Disassembler.

Over the years, many small(er) disassemblers and disassembling tools have been developed either generally for Z80, or for specific computers based on Z80. A selection of several generic tools for disassembling Z80 code is presented here: http://www.z80.info/z80sdt.htm#SDT_DISASM. In my mind, this selection is very dated, yet, some of the tools there can still be useful.

5
  • Having spent quite a bit of my youth in Turbo Pascal 5.5 I am fine with Turbo Vision. I'll have a look at both - Ghidra looks promising as well. Jun 27 at 16:56
  • 3
    Ghidra, though huge and with a monster learning curve (tip: do the tutorial! If you don't think you need to do the tutorial, Ghidra will laugh at you) is absurdly powerful. It's also cross-platform. I was very impressed that it turned a random blob of 8051 binary into "I can see what this does!" source — and I don't even know any 8051!
    – scruss
    Jun 27 at 17:13
  • 2
    I had a quick look at the online disassembler. It hung on my machine while loading a 2Kb image. This might be an adblocker problem though. Jun 28 at 14:35
  • 1
    @ThorbjørnRavnAndersen: My biggest expriment was to disassemble a 1K intro. It did seem to freeze at one point, but simply reloading the page helped in my case.
    – introspec
    Jun 28 at 15:17
  • Great answer, I installed Ghidra but haven't noticed it also supports Z80 Jun 30 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.