Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: can I un-compile amos game ?  (Read 7668 times)

0 Members and 1 Guest are viewing this topic.

rednova

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 225
    • http://www.feryogi.com
can I un-compile amos game ?
« on: August 26, 2013, 10:58:33 PM »

dear friends:

I lost the code to my role/play(aminet) WIZ.lha game.
-wizard of the orb-
is it possible to un-compile the  game into the original
amos code ?
Logged
-mobilis in mobile-

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re: can I un-compile amos game ?
« Reply #1 on: August 27, 2013, 03:29:01 AM »

Hi rednova.

The short answer is no.  Or more accurately, not yet! 

I'm doing a full analysis of the AMOS sources and haven't got to the compiler yet.  Our first priorities are to fix the bugs in AMOS Pro V2.0 (including the compiler eventually) and release a HDD install for it.  As you can imagine, this is taking some considerable amount of (spare) time!

AMOS is a complex beast.  It has to run interrupt-driven programs (AMAL, etc) at the same time as it's running your main program.  So the way it works is far more complex than a simple Basic Interpreter.  The compiler is also very buggy and looks like it will take a fair bit of attention to fix it.  So it may be a while before you see any results.

BUT, you'll hear it here first  ;)

An alternative in the meantime is to use Resource to convert your compiled code back to assembler code.  That assumes that you're familiar with 68000 assembly language.  A fairly onerous task in any case and you'd need some knowledge of the AMOS assembler sources to understand how it all fits together.

Sorry that I can't be more positive.  The best way is to always keep multiple backups.  I know that's "shutting the gate after the horse has bolted" but it's the only way...
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: can I un-compile amos game ?
« Reply #2 on: August 27, 2013, 01:16:56 PM »

i would love to un-compile Super Foul Egg to find out why it crashes on big combos!
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: can I un-compile amos game ?
« Reply #3 on: August 27, 2013, 08:22:13 PM »


Once you get uncompiled/disassembled sourcecode it is rather difficult to work out what it is doing, unless you have a really good memory of the structure of the original source.
The variables would be fairly easy to work out for things you have coded yourself, but still pretty hard when working on someone elses code.

As for dissassembling AMOS compiled programs, they do contain a list of extensions used to make it (all stored in ASCII text) - atleast when the error messages are included - so it may be possible to create an AMOS decompiler. However, such a thing would be a few years away yet :(
Logged

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re: can I un-compile amos game ?
« Reply #4 on: August 28, 2013, 01:09:10 AM »

Quote from: Lonewolf10
Once you get uncompiled/disassembled sourcecode it is rather difficult to work out what it is doing, unless you have a really good memory of the structure of the original source.
The variables would be fairly easy to work out for things you have coded yourself, but still pretty hard when working on someone elses code.
Thanks Lonewolf10, I completely agree.  Having pulled apart more 680xx code than is good for anyone (I really must get out more  :( ) what you end up with is still pretty unintelligible.  Even with the AMOS Pro sources, it's very hard to follow what the author's intent was without a lot of hard work mapping out what the code's doing.  Without the sources (asm or AMOS) it's very, very difficult.

So let's try and lay this myth to rest.  An AMOS decompiler is very unlikely to be built, ever.  There may be some benefit in disassembling some programs that really need bugs fixing.  But even that is a lot of hard work with, sometimes, no worthwhile result.

So, as I replied to rednova, your source files are gold.  Treat them as such.  Personally I back up my system each day to separate drives (on the basis that it's unlikely that more than one drive will fail at once  ;) ).  When I'm writing stuff, you may have noticed that I liberally use "version numbers" embedded in the file names (eg. the on-going docs for the AMOS Loader/Interpreter).  This is not just for regression to previous versions if I need them.  It's because I want as many copies strewn around my drives as possible.  If I'm making major changes, files get backed up at every change point.  Until you get a hard drive crash (or a load of soggy, unreadable floppies - which is what happened to my Amiga library at a mate's place when it got flooded) you won't realise how important this is!  I won't admit to sobbing for days 'cos I'm a bloke  :) , but it's gut-wrenching.

So don't learn the lesson the hard way.  Always keep your old stuff and move it to fresh media every few years.  You never know when you may need it again (some of my PC backups go back to the 90s).
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."
Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022