19 November 2013, 22:20 | #1 |
Registered User
Join Date: Apr 2009
Location: N/A
Posts: 962
|
De-compiler
Hello, is there a C decompiler for the Amiga? There is a game I wish to decompile in order to see its logic and also just for the fun of it. However I do not know what is the best tool for the job.
Last edited by Sim085; 19 November 2013 at 22:56. |
20 November 2013, 06:42 | #2 |
Registered User
Join Date: Nov 2012
Location: Willich/Germany
Posts: 233
|
I'm afraid there's no such tool.
The best way to understand the logic of a (68k) program is to disassemble it. So assembler knowledge is highly recommended. Cheers Sascha |
21 November 2013, 00:52 | #3 |
Registered User
Join Date: Apr 2009
Location: N/A
Posts: 962
|
|
21 November 2013, 11:15 | #4 | |
Registered User
Join Date: Nov 2012
Location: Willich/Germany
Posts: 233
|
Quote:
The best way is trying to rename all the labels with appropriate names like function name or data type, etc. This makes it really easier to understand the code. Then have a look at the labels and its addresses. Sometimes there are offsets being used in combination with a label so its seems there's something wrong. Then you need to change the label like in the following example from Galaga 88: Code:
MFP_KEY_INTERRUPT_HANDLER: movem.l %D0-%D1,-(%A7) moveq #0,%D1 move.b L_00E88000+0x2F.l,%D1 bmi.s L_0002010E move.b KEY_BIT_TRANSLATION_TABLE(%pc,%D1.w),%D1 move.w TRANSLATED_KEY_BITS.l,%D0 bset %D1,%D0 move.w %D0,TRANSLATED_KEY_BITS.l movem.l (%A7)+,%D0-%D1 rte L_0002010E: move.b KEY_BIT_TRANSLATION_TABLE-0x80(%pc,%D1.w),%D1 move.w TRANSLATED_KEY_BITS.l,%D0 bclr %D1,%D0 move.w %D0,TRANSLATED_KEY_BITS.l movem.l (%A7)+,%D0-%D1 rte KEY_BIT_TRANSLATION_TABLE: dc.b 0x1F dc.b 0x08 dc.b 0x1F dc.b 0x1F dc.b 0x1F dc.b 0x1F [...] However, there are some more requirements like having a non-modifying code but I think this gives you a good idea on the problems you might face. At least this is what I've learned while porting Galaga 88 and Pacmania from the X68000. Cheers Sascha |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Storm C Compiler 4 | XDelusion | request.Apps | 3 | 04 August 2012 05:03 |
amiga c/c++ compiler | Fissuras | request.Apps | 41 | 18 June 2012 20:50 |
Pascal compiler | bx20 | support.Apps | 10 | 20 August 2010 13:45 |
Lattice C Compiler Help | redblade | support.Apps | 4 | 21 December 2008 05:57 |
C compiler | raptor_13 | Coders. General | 14 | 27 May 2008 09:40 |
|
|