
                 - IRA 'Intelligent ReAssembler' [PC Port] -

                            - Antiriad / Raine -

What is IRApc?
--------------

It's an unofficial 'port' of an old amiga tool called IRA (Intelligent
reassembler).

"Reassembler means that IRA translates any executable or binary file into an
assembler sourcecode that might immediately be translated back by an assembler."

The reason I ported the code is that I've been using IRA via UAE to disassemble
a lot of MC68000 and MC68020 arcade roms. It was often a hassle to load up UAE,
also it could take a long time to disassemble big roms, so I ported the c code.
It's not a 100% port, I've removed some stuff like support for amiga .exe and
object files. That stuff is not used when disassembling roms. It should still be
possible to reassemble things on a decent 68k assembler.

What about IRA/Amiga?
---------------------

The original IRA was coded by Tim Ruehsen (SiliconSurfer/Phantasm) for amiga,
this message is found with the last public version of ira/amiga:

  "Tim Ruehsen, the author of IRA asked me to upload the IRA sources to Aminet.
   He cannot do this by himself because he doesn't own an Amiga anymore, so he
   has no access to his archives. This is definitely not the latest version of
   the sourcecode. The latest version (68060 + FPU support) got lost. Send any
   questions to truehsen@aol.com." -- Christian Wasner

From that message (some time in 1995), IRA has been dead for nearly 4 years, and
I guess it's fine for me to make a modified version and port the code to dos.

Command Line
------------

USE: IRApc [options] <source> [dest]

- source is some 680x0 code (eg. a pair of interleaved arcade code roms).
- dest is the output file (default is to use the source filename, but with .asm
  extension eg. 68krom.asm).

Command Line Options
--------------------

-a

Append address and data to every line. You should use this.

-info

Show some information about the file.

-M680x0 x=<0..4>

Select processor version. eg. -MC68020. Default is MC68000.

- offset=[number]

Number can be hex/decimal (hex should start with '$'). The rom will be
disassembled as if it was mapped at this offset. Usually, offset should be 0,
but sometimes it is not. eg. to disassemble a bios (neogeo bios), you might need
offset=$C00000, since the neogeo bios is located at $C00000-$C1FFFF.

-text

Search for text data. It looks for ascii strings and dumps them to the screen.

-oldstyle

Adressing modes are M68000 like

-newstyle

Adressing modes are M68020 like

-preproc

Tries to find data in code sections. I tried using this, but it is *not* useful,
it cannot detect code that is indirectly called (eg. from jumptables), also it
has some other flaws... Maybe it works better on amiga executables where code is
relocatable... Just ignore this option then....

-entry=<offset>

Where to begin scanning of code. Anything before this offset will be disassembled
as data... Maybe use -entry=$C0 or similar, so the 68000 vector table is not
disassembled...

Misfeatures
-----------

- Might be some bugs caused by little-big endian issues (the original IRA source
  was not made to be ported).

- Command Line parsing could be improved. Also, the config file is out for now.

- I've only ever disassembled MC68000 and MC68020 roms, but I expect the others
  will work.

- Output files can get very large. Generally, the output will be 10 times the
  size of the input, so a 512kb rom will be 5MB disassembled... Zip them up, they
  compress well.

Hints
-----

- Use Inter.exe (included) to interleave the odd and even bytes of your chosen
  rom (usually necessary).
- If you're not sure the rom is interleaved correctly, use a hex editor to
  search for 0x4E75. This is the opcode for 'rts', so it should appear quite
  a lot inside the rom.
- If you don't find 0x4E 0x75, consider looking for 0x75 0x4E (in this case, you
  have the roms interleaved the wrong way round).
- If you don't know which roms are the 68k code roms, the even rom will contain
  many 0x4E bytes, and the odd one will contain a lot of 0x75 bytes.
- You can usually see where the code ends in the interleaved rom by looking for
  the last occurrences of 0x4E75. I nearly always find this and cut the remaining
  data off... since this will either be game data, or 0x00's or 0xFF's, there is
  no point in disassembling it.
- Make sure you have a text editor that is good with huge files...
  [enough of stupid tips]

Changes
-------

v2.00:

 - Removed options that are pointless for rom disassembly (mostly things related
   to amiga exe's and hunk analysis).
 - Added option to dump opcodes and registers as upper or lower case (I really
   prefer lower case).
 - Removed config file code (not functioning).
 - Fix some endian problems with text dumping.
 - Removed some unwanted features (amiga chipset data in xrefs and amiga exe hunk
   support).
 - Messed with IRA source (v1.05beta by Tim Ruehsen), until djgpp compiled it.

Future
------

It probably does not have a future... but you can do what you like with the
sourcecode as long as it's not profit making and as long as credit goes to
Tim Ruehsen.

Contact
-------

IRApc (unofficial port to MS-DOH):

Richard Bush (Antiriad/Raine)
<antiriad@rainemu.com>
http://www.rainemu.com/

Original IRA (amiga, discontinued):

Tim Ruehsen (SiliconSurfer/Phantasm)
<Get ira105_src.lha for info>
ftp://wuarchive.wustl.edu/systems/amiga/aminet/dev/asm/ira105_src.lha

--------------------------------------------------------------------------------


