Warlock the Avenger trainer

Everything to do with the demo scene. Demos, Groups, Parties and Information, as well as news and opinions.

Moderators: XtC, BuZz, menace

Post Reply
asle
Posts: 208
Joined: Fri Mar 07, 2003 11:28 pm
Location: France
Contact:

Warlock the Avenger trainer

Post by asle »

Hello,

I've struggle to extract the trainer (by Supplex) for the game Warlock the Avenger.
I understand the bootblock read 0x1000 from 0x400, but ...
ah, well, if anyone can make an exe out of it ;)

I've put the first 0x1400 bytes in the following file :
http://asle.free.fr/exotica/diskheader.raw

Thanks ;)
Sylvain

StingRay
Posts: 2
Joined: Wed Apr 29, 2009 5:42 pm

Re: Warlock the Avenger trainer

Post by StingRay »

I just had 30 seconds to waste and created an executable version of that very trainer. You can find it here: http://stingray.untergrund.net/supplex.exe

In case you're interested, this is all that I needed to do:

Code: Select all

	lea	d+$400(pc),a0
	pea	$30000
	move.l	(a7),a1
	move.w	#$1000/4-1,d7
loop	move.l	(a0)+,(a1)+
	dbf	d7,loop
	rts	


d	incbin	windoze:diskheader.raw
As you can see it's not exactly rocket science. :)

asle
Posts: 208
Joined: Fri Mar 07, 2003 11:28 pm
Location: France
Contact:

Re: Warlock the Avenger trainer

Post by asle »

ok, well, indeed, it's not "rocket science". Still it's not something I can do :). So THANKS!. This prod was now added on Kestra :
http://kestra.exotica.org.uk/demo.php?id=24849

By looking at the binary, I see you simply don't care about what's in the bootblock. You just add something in front of it. Basically, this :

Code: Select all

41 FA 04 16 48 79 00 03 00 00 22 57 3E 3C 03 FF
22 D8 51 CF FF FC 4E 75
Ok, I repeat, I can't do that, simply because I don't read/write 68k.
Still, I've had some luck in the past with various other bootblocks by taking data from a "look alike" sequence :

Code: Select all

48 E7 FF FE
Then, by simply adding a standard EXE header, it would work. Ah well, anyway. Thanks again for this. I'll try to repeat this if some other case appear.

With regards,
Sylvain
Sylvain "Asle" Chipaux

StingRay
Posts: 2
Joined: Wed Apr 29, 2009 5:42 pm

Re: Warlock the Avenger trainer

Post by StingRay »

asle wrote: Ok, I repeat, I can't do that, simply because I don't read/write 68k.
Of course you can, it's not hard. Here's what I did:

I disassembled the bootblock of your file, to do that I just created a small source which looked like:

Code: Select all

d incbin windoze:diskheader.raw
after assembling it, I just typed "dd+12" in Asm1 to disassemble (+12 to skip the first 3 longs, i.e. the bootblock header).
the code looked like this:

Code: Select all

movem.l	d0-a6,-(a7)			; save regs
move.l	#$1000,$24(a1)		; length in bytes
move.l	#$400,$2c(a1)		; start offset
move.l	#$30000,$28(a1)		; destination address
move.l	$4,a6
jsr	-456(a6)				; call Exec's DoIO() routine, i.e. load the file
move.w #$8100,$dff096		; enable bitplane DMA
jsr	$30000
movem.l	(a7)+,d0-a6
Now, if you compare that to the code I pasted above you shouldn't have problems to understand what I did and why I did it. Basically I just "emulated" the loading from disk by copying the data to the right location. Whenever you see code like that you can easily create an executable. You need to know 3 things:
1. the start offset [-> $2c(a1)]
2. the length [-> $24(a1)]
3. the destination address [-> $28(a1)]

Once you have that info you can just adapt my "copyloop" above with the right parameters and it should work. Hope that helps, if something is unclear feel free to ask. =)

asle
Posts: 208
Joined: Fri Mar 07, 2003 11:28 pm
Location: France
Contact:

Re: Warlock the Avenger trainer

Post by asle »

is there a doc of this, somewhere ?
Sylvain "Asle" Chipaux

Post Reply