English Amiga Board


Go Back   English Amiga Board > abime.net - Hosted Projects > project.Sprites

 
 
Thread Tools
Old 24 November 2011, 00:24   #1
IHateUnix
Registered User
 
Join Date: Nov 2011
Location: A / B
Posts: 11
How does one reverse engineer Amiga app?

Hi. I want to get C-source code for my RLE algorithm back from motorola machine code.

So, how does one restore his long lost source code in a fastest possible way? Any decompilers/helpful-utils/patched-emulators? At least executable format specs?
IHateUnix is offline  
Old 24 November 2011, 02:44   #2
Minuous
Coder/webmaster/gamer
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,265
There's executable format specs in the official AmigaDOS manual (http://amigan.1emu.net/aw/amigados.zip).

Unfortunately no decompiler for the Amiga appears to have ever existed. I wish someone could prove me wrong on this though :-)
Minuous is offline  
Old 24 November 2011, 05:24   #3
IHateUnix
Registered User
 
Join Date: Nov 2011
Location: A / B
Posts: 11
Quote:
Originally Posted by Minuous View Post
There's executable format specs in the official AmigaDOS manual (http://amigan.1emu.net/aw/amigados.zip).
Thanks. That is useful.

Quote:
Originally Posted by Minuous View Post
Unfortunately no decompiler for the Amiga appears to have ever existed. I wish someone could prove me wrong on this though :-)
Guess I'll have to hack UAE then.
IHateUnix is offline  
Old 24 November 2011, 07:09   #4
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,904
Ok, I'm really no expert for RLE code, but since I may have to deal with it one day when I should ever try to rewrite the compression routines for the icon.library I've already collected some sources somewhere in the past (I don't remember anymore where).

Maybe this stuff, which I never tested yet, could be useful for you:
Attached Files
File Type: rar RLE-code.rar (5.0 KB, 239 views)

Last edited by PeterK; 24 November 2011 at 07:14.
PeterK is offline  
Old 24 November 2011, 12:52   #5
IHateUnix
Registered User
 
Join Date: Nov 2011
Location: A / B
Posts: 11
Quote:
Originally Posted by PeterK View Post
Maybe this stuff, which I never tested yet, could be useful for you:
Doubt that. During my hacking I already did about 100 RLE algorithms and only a few were similar (one used in Gold Box games was similar to Amiga's LBM int it's interleaving of bitplanes). Today I deal with some RNC packed file, which has ILBM LBMs and some RLE bitplane crud.

The easiest way would be to disassemble whole exe, the grep original RNC routines.
IHateUnix is offline  
Old 24 November 2011, 21:39   #6
prowler
Global Moderator

prowler's Avatar
 
Join Date: Aug 2008
Location: Sidcup, England
Posts: 10,300
Quote:
Originally Posted by IHateUnix View Post
Doubt that.
@IHateUnix: Even though you may be relatively experienced at this, please make an effort not to be so dismissive when another member offers help, lest you deter others from trying to do so.
prowler is offline  
Old 24 November 2011, 23:24   #7
kamelito
Zone Friend

kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,388
There is a 68k to C program but I don' t remember it, just search the board with my nick.
I also contacted one game developer who wrote such a program to translate 68k code to C but I didn't hear back from him, maybe it's time to ping him again...
Kamel
kamelito is offline  
Old 25 November 2011, 05:30   #8
IHateUnix
Registered User
 
Join Date: Nov 2011
Location: A / B
Posts: 11
It seems boomerang can handle m68x.
IHateUnix is offline  
Old 27 February 2013, 22:00   #9
Emerald
 
Posts: n/a
The tool you need is....resource

resource is the only true disassembler that was designed to disassemble to clean source code (asm files) on the Amiga (as far as i can remember).

There's more info at:-
http://amiga-dev.wikidot.com/tool:resource

And if you search the net hard enough there are some illegitimate copies or resource to be found.
 
Old 27 February 2013, 22:20   #10
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,651
ReSource will not do what the thread opener wants:
Quote:
I want to get C-source code for my RLE algorithm back from motorola machine code."
While ReSource is the best Amiga disassembler in my opinion it is not a decompiler. These are 2 completely different things.
StingRay is offline  
Old 27 February 2013, 22:26   #11
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,191
Yeah, for x86 and ARM code there's the amazing (and very expensive) Hex-Rays. But I'm not aware of anything similar for M68K code so you'd probably have to resort to using ReSource and hand-coding an equivalent routine in C. It sounds like that would be quite do-able for a relatively small RLE routine.
mark_k is offline  
Old 28 February 2013, 19:50   #12
copse
Registered User
 
Join Date: Jul 2009
Location: Lala Land
Posts: 290
Quote:
Originally Posted by IHateUnix View Post
It seems boomerang can handle m68x.
Boomerang is bug prone, unreliable and unmaintained. I wouldn't advise wasting any time on it, but it is your time to waste. I just got random crashes when I tried it.
copse is offline  
Old 02 March 2013, 10:50   #13
RedskullDC
Digital Corruption

RedskullDC's Avatar
 
Join Date: Jan 2007
Location: Dorrigo/Australia
Age: 57
Posts: 344
Hi,
Quote:
Originally Posted by IHateUnix View Post
Hi. I want to get C-source code for my RLE algorithm back from motorola machine code.

So, how does one restore his long lost source code in a fastest possible way? Any decompilers/helpful-utils/patched-emulators? At least executable format specs?
I'm not aware of any 68K specific de-compilers.

ReSource or IDA-PRO(running on a PC) will give you a decent 68K disassembly of Amiga executables.

One option may be to use http://m682386.sourceforge.net/
to convert from 68K to X86, then use HEX-RAYS (as Mark K mentioned) to create the equivalent C(like) source code.

Is there a specific routine(s) you want to get back?
Can you post the executable so we can have a look?

I have hex-rays, so may be able to assist?

Cheers,
Red
RedskullDC is offline  
Old 02 March 2013, 12:41   #14
hooverphonique
ex. demoscener "Bigmama"

 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,255
you will never be able to get the original code back by decompiling.. you may get something similar that may or may not work as the original code did, but it won't be pretty.. I suggest disassembling it and then rewriting it in C manually..

Did you check if your module is a debug build? maybe it already contains the original code "hidden" somewhere..
hooverphonique is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quicksilver/LaunchBar-like app for amiga? wXR Amiga scene 1 13 February 2013 19:13
Might and Magic ][ Reverse Engineer Vairn project.Amiga Game Factory 31 07 January 2009 00:31
Need help loading an app into Amiga. BlazingFire456 New to Emulation or Amiga scene 11 07 September 2006 19:17
Image Engineer phil support.Apps 0 27 April 2005 23:24
New Amiga Sound App From Up Rough! spoUP Amiga scene 4 14 October 2003 13:32

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.10282 seconds with 16 queries