1

The last time I tried my hand at disassembly it was in 1986-1988... a Z80 embedded processor PROM image file...
42K of code turned into 27000+ lines of assembler code... using a disassembly program called Dazzlestar... which ran on 8080/8085/Z80 CP/M (am I dating myself?) Anyway I was able to add a number of features to the source and re-assemble it and it worked...

But that was then and this is now.

I've been asked by a friend to patch the firmware in another embedded system, a Z180 that uses a little over half of a 27C512. All he wants to do is to change the baud rate of the Exar 88C681 serial port from 2400 baud to 9600 or even 19.2 if it will do it. If I'm reading the Exar data sheet correctly it should be a 1 or 2 byte patch.

Yes, this old embedded product was designed to run with a Hayes Smartmodem 2400 because at that time it was the most common modem in personal home computing. The product itself has been abandoned by the manufacturer... they no longer support it and they'd like to pretend they never made it.

I have IDA Free 8.3 on my Win10 laptop and the 64kb image file of the 27c512 PROM chip (it is a .bin, the executable code starts at address zero).

When I start IDA it says that it can't proceed because it's not a PE file.
It took me about 30 minutes to find out that PE meant Portable Executable.

How do I fix this? Is there a tool that will convert a .bin to an acceptable PE ? Or is there a command line option to allow it to read a .bin ?

I did some searches looking for any mention of IDA Free and PE and found nothing. But as I said, I'm a newbie and may not have searched with the correct words...

Is there a tool that I missed that converts a .bin into a PE ?

If IDA is not the proper tool for breaking a .bin into assembly then what is?

It needs to be free or cheap as I'm in my 70s, retired, on a limited fixed income and doing this out of my own pocket as a favor for a friend I've known for over 50 years. It will be fun to get back into bit-banging!

I really hope the image file is assembly and not compiled!

3
  • 1
    The IDA Free web page mentions the limitation "Support x86/x64 processors".
    – Robert
    Oct 25, 2023 at 8:26
  • A disassembler targets a specific instruction set usually. It turns machine-readable instructions back into human-readable mnemonics as they are known from assemblers. That's what disassembly is. So your file needs to be compiled in some way, because if it isn't already machine-readable you likely have a human-readable form already. Seeing the extension .bin suggests you have some form of compiled (or assembled) binary, though. So a disassembler targeting the desired instruction set should be capable of helping out. Also have a look at objdump from Binutils if the others don't work.
    – 0xC0000022L
    Oct 25, 2023 at 20:46
  • Thanks for the response. Yes, I have a 32k image file of about 20K of assembled Z180 binary... (the rest of the 27C512 is blank). It's the firmware from an industrial device. And as I said, about 35 years ago I turned 42K of Z80 binary back into 27000+ lines of assembler. So I know what disassembly is. I'm just looking for a Win10 tool to do that to Z180 code.
    – Mike
    Oct 27, 2023 at 2:31

2 Answers 2

1

PE in this context stands for "Portable Executable", the format used mainly by Windows OS.

The firmware you are trying to load is supposed to run on embedded systems that don't use this format.

On IDA's file loader you should select "Binary file", and you will probably have to manually select loader parameters such as processor type, ROM and RAM addresses etc.

Note that IDA free version is limited by the types of processors it supports, this 8086 may or may not be supported.

Note2: When loading x86 code IDA will ask whether the code is 16-bit or 32-bit. It is 16.

1
  • PE are also used by .NET and in UEFI context, though. Admittedly with a strong Microsoft bias, but I guess mainly Windows captures that as well.
    – 0xC0000022L
    Oct 25, 2023 at 20:38
1

Well, it looks like IDA Free won't do what I need... It was pointed out that it is limited to x86 and x64 CPUs and the Z180 isn't one of those.

(edit: typo correction)

4
  • Hi and welcome to RE.SE. Please don't ask another question within an perfectly acceptable answer. Open another question. Although in this case it's not a good fit for this site. It is also customary not to use "Thanks" in questions or answers. Comments are fair game for that, though (and seeing that you are new you are of course limited in where and how you may comment). For further details please have a look at our help center. That said: have you tried tools such as Ghidra or Cutter/Rizin which are available free of charge?
    – 0xC0000022L
    Oct 25, 2023 at 20:42
  • Looks like Ghidra could be a match?! -> github.com/NationalSecurityAgency/ghidra/blob/master/Ghidra/…
    – 0xC0000022L
    Oct 25, 2023 at 20:47
  • 1
    Cutter/Rizin does not support Z180 (or it's predecessors the Z80, 8085 or 8080). I will look at Ghidra
    – Mike
    Oct 27, 2023 at 2:33
  • Yeah, I'll be honest. I didn't check up front. Which is why I posted the additional comment about Ghidra a bit later.
    – 0xC0000022L
    Oct 27, 2023 at 8:54

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .