03 March 2021, 05:00 | #1 |
Registered User
Join Date: Jul 2009
Location: Lala Land
Posts: 608
|
Ghidra for amiga disassembling
I see that Ghidra supports "68xxx" and there's a executable file loading extension. Has anyone given a shot? Thoughts? I've been thinking about playing around with my disassembler, but wondering if I am better off using Ghidra, especially since people talk about "ghidra servers" and mutual reverse engineering efforts.
https://github.com/lab313ru/ghidra_amiga_ldr/ |
03 March 2021, 08:00 | #2 |
Thalion Webshrine
Join Date: Jan 2004
Location: Oxford
Posts: 14,646
|
It's being used extensively to reverse engineer Ambermoon
|
21 June 2023, 15:54 | #3 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 620
|
When I try to build the amiga_ldr extension using gradle I just get this error. (I've not used gradle before). Any Ideas how to solve this?
Btw, I installed JDK 17.0.7 and Gradle 8.1.1. Edit: Now I was able to build Bartmans fork of the extension with gradle. However still no luck in installing the extension. In the "Install Extensions" list the entry is there, but in red colour. Am I supposed to build the extension using gradle or just place the folder/zip at the right place and Ghidra will build it when selected? Sorry, I don't have experience in this... Using Ghidra 10.3 public btw... Last edited by Nightshft; 21 June 2023 at 17:06. |
21 June 2023, 17:35 | #4 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,311
|
I just downloaded the release (https://github.com/BartmanAbyss/ghid...s/tag/20230525) and installed that without compiling it myself, and it works fine with Ghidra 10.3. No need to compile it yourself unless you want to.
To install, open file->install extensions..., press the green + button and select the zip file (don't extract it). |
21 June 2023, 20:58 | #5 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 620
|
Well now that really took some tries...
but now it works. Thanks paraj Note: Ghidra 10.3.1 still wouldn't take it. Extension version for [extname.zip] is incompatible with Ghidra. I had to edit extension.properties to reflect version 10.3.1 and then it worked finally =) |
16 July 2023, 08:16 | #6 |
Registered User
Join Date: Jul 2009
Location: Lala Land
Posts: 608
|
Thanks for the notes paraj and nightshift. These are valuable hints to save time, much appreciated.
|
18 July 2023, 14:29 | #7 |
Registered User
Join Date: Jun 2021
Location: UK
Posts: 29
|
I used Ghidra for finding the terrain gen in PowerMonger, but I have a question about it.
The "Languages" section of Ghidra, without realising I selected the "68000 Coldfire" language option initially thinking it was just 68000. There's language options for 68020 and 68040 big endian as well. It worked fine, but for amiga dissassembly I'm not 100% sure which one I should be using. There doesn't seem to be a 68000 "default" big endian option and I don't think Coldfire was the same chip. |
18 July 2023, 14:40 | #8 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,492
|
The coldfire instruction set is a subset of the 68000 instrution set, so some instructions would likely be marked as invalid. The 68020 is a superset of the 68000 instruction set. As long as the source does not use any of the 68040 specific instructions, or only 68000 instructions, you would be safe.
|
18 July 2023, 15:13 | #9 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,097
|
Coldfire aka cpu32, you can check the m68k programmer's ref guide if you are interested in details. Basically, it has a small subset of the 68020+ stuff, doesn't have all of the base 68000 stuff, and it has some exclusives that 68000+ don't have.
|
18 July 2023, 18:30 | #10 |
Registered User
Join Date: Jun 2021
Location: UK
Posts: 29
|
Thank you both!
|
07 November 2023, 20:03 | #11 |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
I'm using Ghidra with the Amiga extension to analyse a C executable, which uses the small data model. Is it possible to pass a base register and value to the analysis so to that data labels can be derived? The equivalent of the ira config BASEREG and BASEADR directives.
|
07 November 2023, 20:12 | #12 | |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,311
|
Quote:
|
|
07 November 2023, 20:45 | #13 |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 277
|
Magic! That seems to have worked thanks.
|
08 November 2023, 19:37 | #14 |
Registered User
Join Date: Jun 2021
Location: UK
Posts: 29
|
I've been analysing a raw RAM export (.data) from WinUAE in Ghidra for quite a while now. Naming functions, renaming labels and data areas, etc.
I want to swap out the RAM data for another snapshot (.data), where I think certain areas will have been updated, but I'm not seeing an easy way to do this? It's a difficult thing to phrase as a question in Google as well (and google seems to be pretty bad lately, no idea why, so I'm not getting good results there either). |
08 November 2023, 21:07 | #15 |
Registered User
Join Date: Jul 2009
Location: Lala Land
Posts: 608
|
This sounds like a general Ghidra problem and nothing Amiga specific beyond the context of the data. You should be able to search for people doing this for other architectures.
There is a default symbol import plugin. In the worst case you might be able to see how to export/import symbols and other metadata. |
29 November 2023, 08:24 | #16 |
Registered User
Join Date: Jul 2009
Location: Lala Land
Posts: 608
|
Does anyone have any experience with getting Ghidra to recognise jump tables that it does not already recognise in decompiled Amiga code?
My long term Pool of Radiance disassembling project was accelerated by finding that the C# rewriting of disassembled or decompiled Curse of the Azure Bonds PC code had almost identical data structures and code to my Amiga decompilation. But it's stalled on the ECL script VM given Ghidra didn't pick up on the jump tables and map in all the functions. For reference in case anyone is interested, I had a long term Resource file of my disassembly and saved out the program file from Resource with my symbols. Then I imported that into Ghidra. A lot of my work has I think been perhaps not being clear on where the boundaries of what I am told the Pascal (?) compiler's statically linked functions are thunked in and documenting those structures and functions. But it only has to be done once I guess, then all gold box games are mostly an exercise in repeating the first (given the visible Amiga Pool of Radiance and PC Curse of the Azure Bonds similarities). |
06 February 2024, 01:08 | #17 |
Registered User
Join Date: Jul 2009
Location: Lala Land
Posts: 608
|
Anyone tried updating the amiga plugin for Ghidra 11?
|
06 February 2024, 13:14 | #18 |
Thalion Webshrine
Join Date: Jan 2004
Location: Oxford
Posts: 14,646
|
|
07 February 2024, 00:46 | #19 |
Registered User
Join Date: Jul 2009
Location: Lala Land
Posts: 608
|
Nice, will give it a shot. Thanks Alex.
|
09 February 2024, 22:06 | #20 |
Registered User
Join Date: Jul 2009
Location: Lala Land
Posts: 608
|
Just installed 11.0.1 and the 11.0 Amiga extension from nicode. I get a version mismatch message for 11.0.1 not being 11.0, but can click through it. No errors so far.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help disassembling Wicked | moohorse | Coders. Asm / Hardware | 33 | 04 June 2023 22:57 |
Ghidra disassembler / decompiler supports 68000 | mark_k | Coders. Asm / Hardware | 21 | 20 March 2019 12:09 |
Disassembling an A600 | Revival9001 | support.Hardware | 2 | 31 January 2017 07:01 |
Disassembling resource | copse | Coders. General | 1 | 02 April 2012 03:36 |
Disassembling and reassembling | absence | Coders. General | 7 | 22 September 2009 15:30 |
|
|