Fun with 68K Assembly Language (WEEE!)

Started by juncmodule, Thu 11/12/2003 04:31:34

Previous topic - Next topic

juncmodule

I recently started a topic on the mega-tokyo forums about disassembling an old game called Brataccas.

Why am I posting this all here? Well, I'm hoping that someone with knowledge of AGS and Assembly might be able to help me get my head around some concepts(at the moment ISR's and asynchronous code). If you can use AGS as a frame of reference. For example, I understand subroutines because in AGS they are called functions.

Also, if anyone could help me with this I would be VERY grateful!

this is my original post:
Quote
After teaching myself a tiny bit of German I was able to output the Assembly code of an Atari ST game called Brataccas.

Or at least I think that is what I did

There are two main files that run the program:

BRATACCA.PRG
MAIN

If my understanding of how most software works BRATACCA.PRG is the interpreter of sorts, MAIN is the resources.

My goal here is only to extract images from these files. I have no idea how to go about this.

I requested Brian's help long ago, but, he is still busy with SCI Studio (although he did offer to help when SCI VGA is released).

Basically, I am going to do as much as possible myself. I consider it a small miracle that I made it this far, and with a disassembler written in German at that (actually it was pretty easy to figure out).

Any help from anyone would be GREATLY appreciated.

You may download both the original files and the decompiled txt files here:

http://www.juncmodule.com/juncAGS/BRATACCAS.zip


You can check out the thread here: http://www.mega-tokyo.com/forum/index.php?board=6;action=display;threadid=5068;start=0;boardseen=1

thanks!!!

later,
-junc

Haddas

* Looks at screen with half closed eyes, gaping mouth & finger up in nose. Then says:
Huh?!?

SSH

Probably the images are stored in the bytes disassembled as DC.B . These are data and not instructions. I'm not sur why you need to disassemble the code to be able to extratc the images. Basically, it would help if you knew which screen mode the game runs in on the ST:  I seem to recall that there was one mono and two colour resolutions. Games typically run in the lo-res, 16-colour one which would have two pixel per byte. Finding the palattes might be more difficult.

but if you want to carry on disassembling, http://www.atari-st.lovely.net/atari-st-docs/ might help.

I'll be happy to answer any specific questions you have about 68k assembler...
12

juncmodule

QuoteFinding the palattes might be more difficult

LOL ;D  Ahhh...the beauty that is Brataccas. Brataccas was originally written for the Spectrum, or at least its predecessor Bandersnatch was. Imagine went flop and a few of the big wigs ran off and formed Psygnosis. They brought the remnants of Bandersnatch along with them and rewrote it for the Amiga, Mac, and Atari ST. It still retains much of its former glory, mainly it's MASSIVE 4 color palette.  :P

QuoteI'm not sur why you need to disassemble the code to be able to extratc the images

Basically it sounds like you are telling me I could do this without having to learn 68k assembly first!? That would be fantastic. So....how?

Excuse my ignorance but, outside of ripping screenshots and actually disassembling the game I have no idea how one would go about doing something like this.

Quotebut if you want to carry on disassembling, http://www.atari-st.lovely.net/atari-st-docs/ might help.

I have a lot of info from that site, however that site itself is infected with many dead links. I emailed the webmaster, but, it was down yesterday too...

Thanks!
-junc

SSH

#4
Here's something to try:

If it runs in the ST's 4-colour 640x200 mode then:
Write a program that takes each pair of bits from each byte in main (the other file looks like a crack loader to me!) and displays them in four different colours. You should be able to see where there are graphic-like patterns, so then try adjusting the number of pixels across until you get something that looks like a sprite. It will probably be a power-of-2 number of pixels wide...

Also take a look at:
http://www.lynn3686.freeserve.co.uk/pp26_inf.html
http://www.spythis.com/cca/37.html :PROB1_01  Probe - ST version 1.01 is a music ripper and a graphics ripper with a disk operations section and various search options.

12

juncmodule

I followed some of the links you provided and found a program called ADR ripper. It does display an image and while playing around with it I was able to spot a character or two...very distorted. I couldn't get it to display anything in full though. Very frustrating to be that close and...not really.

Blah.

QuoteWrite a program that takes each pair of bits from each byte in main (the other file looks like a crack loader to me!) and displays them in four different colours.

Unfortunately, I have no such skills.

Very frustrating.

eh,
-junc

SMF spam blocked by CleanTalk