'W.A.R. (Martech 1986)'
Author:Lord Crass (guest: search)
Date: Wed, May 18th, 2011 @ 15:08 ( . )

Hopefully Nate or Pete has the original.

I'm not sure how many instructions there are. When you look at the block of code that contains the compiled/interpreted program, you don't initially know which ones are opcodes and which are the operands. Once you start determining what each opcode does, you'll see how many operands it takes and the p-code starts falling into place. I see about 524 total bytes of p-code, which includes some data as well, such as the "COPY IS NOT PERMITTED" message.

The Electronic Arts fat track loader is a svelte, efficient, specific-purpose interpreter compared to this thing. This one has stack, memory, and multiple registers. It occasionally makes calls into the C64's standard BASIC ROM as well as the kernel ROM (which actually makes it easier to determine the purpose of a given opcode). I can't find any distinguishing text about it, so I don't know if it's a generic compiler such as Blitz, or if it's a custom interpreter written for this title.

I likely won't have to decode every instruction. Once I get enough of them figured out I should be able to see where it doing something with the values it reads in from the drive. Hopefully it's just a simple comparison and not some key for a decryption routine.

I don't have a lot of spare time for this right now, so it might take some weeks to finish it off.


REPLY: [With No Quote] --- [With Quoted Text]

'W.A.R. (Martech 1986)'
Author:Nate (guest: search)
Date: Fri, May 20th, 2011 @ 22:22 ( . )

I don't have the original. I was only working from the nib file.

I'm glad to see it's a hard scheme, and I'm not just a dunce. :)


REPLY: [With No Quote] --- [With Quoted Text]

'W.A.R. (Martech 1986)'
Author:Lord Crass (guest: search)
Date: Sat, May 21st, 2011 @ 01:04 ( . )

It's amazingly time consuming. I'm guessing this isn't a custom virtual machine, it's a commercial BASIC compiler since it has so many instructions.

I'm up to 31 instructions now and some of them I've skimmed over poorly since the functions they delve into are quite large.

It's hard to find motivation to put the kind of time required into this one since the game itself isn't very good, and this seems to be a one-off protection. It'd be nice if the knowledge gained from this could be used towards other titles, but it seems unlikely.


REPLY: [With No Quote] --- [With Quoted Text]

'W.A.R. (Martech 1986)'
Author:hyper active (registered user: 296 posts )
Date: Sat, May 21st, 2011 @ 01:14 ( . )

Please don't give up on it though.


REPLY: [With No Quote] --- [With Quoted Text]

'W.A.R. (Martech 1986)'
Author:Lord Crass (guest: search)
Date: Sat, May 21st, 2011 @ 01:15 ( . )

Come to think of it, an easier way to figure this one out is to write some simple BASIC code and compile it with some known BASIC compilers, then disassemble the generated code to see which one matches W.A.R.'s.

Once you figure out what compiler was used, it's pretty straightforward to decompile the unknown tokens.


REPLY: [With No Quote] --- [With Quoted Text]

'W.A.R. (Martech 1986)'
Author:hyper active (registered user: 296 posts )
Date: Sun, May 29th, 2011 @ 00:16 ( . )

rtl64, simon's basic, blitz compiler, and austro-comp.
Those are the 4 basic compilers I am aware of.


REPLY: [With No Quote] --- [With Quoted Text]

'W.A.R. (Martech 1986)'
Author:J Achernar (registered user: 36 posts )
Date: Sun, May 29th, 2011 @ 09:47 ( . )

Abacus Basic 64 compiler can compile to either p-code or machine language. Also, there are two different compilier/optimizers. However, at the beginning of the compiled executable there is text stating "1984 SYS 2078 BASIC 64 V1.03".


REPLY: [With No Quote] --- [With Quoted Text]


--- 0 Users Online --- 0 Recent Unique Posters

Q112=1653261253 - Threads: / 1653261253