Overview

ReSource is referred to as “an interactive disassembler”. There are many other native disassemblers, both public domain and commercial, for the Amiga. But what sets ReSource apart from these, is that rather than being a non-interactive command-line tool, or a souped up debugger, it goes far beyond these limited paradigms, as a flexible disassembling environment.

It features a range of different ways to import material to be disassembled:

Loading in a binary file.

Loading in an executable file.

Taking a snapshot of data at a given address in memory.

Reading data directly from a mounted disk.

As data is obtained to be executed, ReSource does a preliminary disassemble of it, processing any available debugging information. The disassembled code is then presented to the user as a screen of text that can be scrolled through, jumped around within or searched. Lines of code can be given labels, or might perhaps already have them from debugging symbols or even just relocatible references that ReSource has identified. Values can be identified and replaced by known symbols that ReSource is aware of, which might perhaps be library function offsets, thereby rendering the code being disassembled more readable.

There are a range of ways in which the code being disassembled can be output:

As a .rs file. This is how work in progress is stored on disk, to be reloaded into ReSource when it is run again at a future point in time.

As a disassembled .asm file. This is the generated assembly code which the user is disassembling in a WYSIWYG fashion, within ReSource.

Demo Versions

As a commercial product, ReSource is no longer available. However, over time demo versions were released within Fish disks. If you want to do some exploratory one-off interactive disassembling of some interesting material, then these are more than suitable for your needs. However, they are not suitable for gradual decompilation over progressive attempts, as the facility to save either final (assembly code) or intermediate (.rs files) work has been removed.

As each Fish disk entry notes:

A demo version of ReSource, an interactive disassembler for the Amiga. This is a complete version except that the "save" features have been disabled.

Tips and Tricks

Reading the manual can often be invaluable. However, not everyone has the time to do this or they may have been burnt by other less than helpful documentation in the past. So this section aims to provide any information, even if it is also covered in the manual, in order to help you use ReSource to its full extent. Even so, as shown below, documentation does not always inform the user about all useful information.

Available Tooltypes with v6.06

The Manual mentions 2 tooltypes: LACEFLAG and NOLACEFLAG.

There are in fact two other useful tooltypes available:

SYSRENDER = OFF/ON.
When set to ON, this will force ReSource to use graphics.library routines to update the screen instead of it's own internal routines. In effect this makes ReSource compatible with Picasso96 or CyberGfx screens. Necessary if you wish to use ReSource with WinUAE.

REQMODE = OFF/ON.
When set to ON, this will force ReSource on starting to display a screenmode requester. Again, set to ON if using WinUAE/P96/CBGFX screens. Only select an 8-bit RTG mode, as the colours will display incorrectly for 16/32bit screen modes.

Dealing With Absolute Addresses

The documentation says this on the subject:

… For one thing, there is no reloc32 information present. Disassembling such code can be done, but it is time-consuming and tricky work.
Because ReSource cannot use internal information supplied by the loader to make decisions based on data type, it is best not to use the automatic "Disassemble" function. Doing so would likely create a lot of undesirable labels in the middle of instructions as ReSource runs into data or ASCII, and tries to disassemble it. …

Data you wish to disassemble that involves absolute addresses may be the following:

It is a saved snapshot of a memory range.

It was compressed by a tool that unpacks to an absolute address.

It was compiled this way.

While the documentation does not say so, it is and has been possible at least since version 4.00 of ReSource, for you to specify a base address in the * menu, using the Origin sub-menu. You still need to watch what labels are created, because the absolute addresses used are fairly low (i.e. $40000), it is not uncommon for them to be displayed as relative to the START label when the origin value is set in this way.

Known Bugs

v6.06

Creates .w offsets for some .b type branches when near the +/-127/128 byte offset limits. Especially when branching ahead. (Source: RedSkullDC on English Amiga Board).

Creates incorrect word offsets when code with an offset in the relocation table resolves to an absolute location outside the HUNK that the relocation table belongs to (The apple2000 V1.3 emulator is a good example of this). In reality, this is pretty hacky hand-assembly anyway. Doubt you would ever see a compiler produce such code. (Source: RedSkullDC on English Amiga Board).

Leaks references to original base register variable name DT wherever it is used, if the variable gets renamed. e.g. movea.l Variable1-DT(A4), A0. This will be the first variable in a SECTION and will have automatically been renamed to DT. If you rename it at a later point to reflect the actual use of this variable, this is when the problem will occur. As it is not possible to add multiple labels for the same address in Resource, you need to fix it manually when compiling the resulting source code. (Source: copse on English Amiga Board).

When "New Syntax" is turned off, a few instructions are still disassembled with "New Syntax" regardless. e.g. "movem.l (label,pc), …" or "frestore (label,pc)".

When "New Syntax" is turned off, some instructions are not disassembled correctly. e.g. unpk, movec, bfextu.