;Conqueror’s DOS fileloader, ripped from “DEEP CORE” coverdisk preview version
;ripped + modified to let you set the MFM buffer address -WK
conqload:

movem.l d0-a6,-(sp)
lea ($BFD100).l,a5
bsr.w sub_7E948
lea unk_7EA93(pc),a6
andi.b #$7F,(a5)
move.b (a6)+,d0
move.l a0,2(a6)
st 6(a6)
and.b d0,(a5)
move.w #$370,d0
bsr.w sub_7E9A2
movea.l a1,a2

loc_7E8AE:
tst.b (a2)+
bne.s loc_7E8AE
suba.l a1,a2
subq.w #1,a2
move.l a2,d2
moveq #0,d3
move.l d2,d4
move.l d4,d6
movea.l a1,a3

loc_7E8C0:
mulu.w #$D,d2
move.b (a1)+,d3
cmpi.b #$61,d3 ; ‘a’
bcs.s loc_7E8D6
cmpi.b #$7A,d3 ; ‘z’
bhi.s loc_7E8D6
subi.b #$20,d3

loc_7E8D6:
add.w d3,d2
andi.w #$7FF,d2
subq.w #1,d4
bne.s loc_7E8C0
divu.w #$48,d2
swap d2
addq.w #6,d2
lsl.w #2,d2
move.l (a0,d2.w),d0

loc_7E8EE:
bsr.w sub_7E9A2
lea $1B0(a0),a1
cmp.b (a1)+,d6
bne.s loc_7E93A
movea.l a3,a2
move.w d6,d0

loc_7E8FE:
cmpm.b (a1)+,(a2)+
bne.s loc_7E93A
subq.w #1,d0
bne.s loc_7E8FE
move.l $144(a0),d0
add.l dword_7EA96(pc),d0
move.l d0,6(a6)

loc_7E912:
move.l $10(a0),d0
beq.s loc_7E940
bsr.w sub_7E9A2
lea $18(a0),a1
movea.l dword_7EA96(pc),a2
move.l dword_7EA9A(pc),d0
move.w #$1E7,d7

loc_7E92C:
move.b (a1)+,(a2)+
cmpa.l d0,a2
dbeq d7,loc_7E92C
move.l a2,2(a6)
bra.s loc_7E912
; —————————————————————————

loc_7E93A:
move.l $1F0(a0),d0
bne.s loc_7E8EE

loc_7E940:
bsr.s sub_7E948
movem.l (sp)+,d0-a6
rts
; End of function conqload

; ヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲ S U B R O U T I N E ヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲ

sub_7E948:
ori.b #$F8,(a5)
andi.b #$87,(a5)
ori.b #$78,(a5)
rts
; End of function sub_7E948

; —————————————————————————

loc_7E956:
bset d7,(a5)
bsr.s sub_7E97C

loc_7E95A:
btst #4,$F01(a5)
bne.s loc_7E956
sf (a6)

; ヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲ S U B R O U T I N E ヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲ

sub_7E964:
tst.b (a6)
bmi.s loc_7E95A

loc_7E968:
cmp.b (a6),d2
beq.s loc_7E998
bcc.s loc_7E974
bset d7,(a5)
subq.b #1,(a6)
bra.s loc_7E978
; —————————————————————————

loc_7E974:
bclr d7,(a5)
addq.b #1,(a6)

loc_7E978:
bsr.s sub_7E97C
bra.s loc_7E968
; End of function sub_7E964

; ヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲ S U B R O U T I N E ヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲ

sub_7E97C:
bclr d3,(a5)
mulu.w d3,d3
bset d3,(a5)
move.b d3,$500(a5)
move.b #$10,$600(a5)
move.b #$19,$E00(a5)

loc_7E992:
btst d3,$E00(a5)
bne.s loc_7E992

loc_7E998:
btst #5,$F01(a5)
bne.s loc_7E998
rts
; End of function sub_7E97C

; ヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲ S U B R O U T I N E ヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲ

sub_7E9A2:
moveq #0,d3
moveq #1,d7
moveq #2,d5
movea.l #mfmbuff,a4
; lea (unk_A04).l,a4 ;MFM buff
move.l d0,d2
ext.l d2
divu.w #$B,d2
move.l d2,d4
swap d4
cmp.b 1(a6),d2
beq.s loc_7EA2A
move.b d2,1(a6)
bset d5,(a5)
btst d3,d2
beq.s loc_7E9CC
bclr d5,(a5)

loc_7E9CC:
lsr.w #1,d2
bsr.s sub_7E964
move.b #5,-2(a6)
bra.s loc_7E9E4
; —————————————————————————

loc_7E9D8:
subq.b #1,-2(a6)
bne.s loc_7E9E4
moveq #-1,d2
move.w d2,(a6)
bra.s sub_7E9A2
; —————————————————————————

loc_7E9E4:
movea.l #mfmbuff,a4
; lea (unk_A04).l,a4 ; MFM buffer
lea ($DFF020).l,a0
move.l a4,(a0)+
move.w #$8210,$72(a0)
move.l #$27F00,$78(a0)
move.w #$9500,$7A(a0)
move.w #$4489,$5A(a0)
move.w #$9900,(a0)
move.w #$9900,(a0)
move.l #$A00000,d7

loc_7EA1A:
subq.l #1,d7
beq.s loc_7E9D8
btst #1,-5(a0)
beq.s loc_7EA1A
move.w #$4000,(a0)

loc_7EA2A:
lea $3200(a4),a2
movea.l a2,a0
move.l #$55555555,d5
moveq #$A,d1

loc_7EA38:
cmpi.w #$4489,(a4)+
bne.s loc_7EA38
cmpi.w #$4489,(a4)
beq.s loc_7EA38
movem.l (a4),d2-d3
bsr.s sub_7EA88
lsr.w #8,d2
cmp.w d4,d2
beq.s loc_7EA5C
adda.w #$438,a4
dbf d1,loc_7EA38
bra.w loc_7E9D8
; —————————————————————————

loc_7EA5C:
swap d2
cmp.b 1(a6),d2
bne.w loc_7E9D8
lea $34(a4),a4
move.l (a4)+,d4
moveq #$7F,d7

loc_7EA6E:
move.l $200(a4),d3
move.l (a4)+,d2
eor.l d2,d4
eor.l d3,d4
bsr.s sub_7EA88
move.l d2,(a2)+
dbf d7,loc_7EA6E
and.l d5,d4
bne.w loc_7E9D8
rts
; End of function sub_7E9A2

; ヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲ S U B R O U T I N E ヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲヲ

sub_7EA88:
and.l d5,d2
and.l d5,d3
add.l d2,d2
or.l d3,d2
rts
; End of function sub_7EA88

; —————————————————————————
dc.b 5
unk_7EA93: dc.b $F7
dc.b $FF
dc.b $FF
dword_7EA96: dc.l $ffffffff
dword_7EA9A: dc.l $ffffffff
mfmaddr: dc.l $0
filename: dc.b “TEST”,0
even
; —————————————————————————

****************************************************************************
; VARIABLES
****************************************************************************

gfxlib: dc.b “graphics.library”,0,0
gfxbase: dc.l 0

old_Intena dc.w 0
old_Dmacon dc.w 0

even
;space for MFM buffer
mfmbuff: blk.b 16384,0
even
;space for loading buffer
loadbuff: blk.b 32768,0
even

theend:

0

Publication author

offline 51 mins

mus@shi9

0
Comments: 1160Publics: 2778Registration: 06-03-2017

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
Conqueror
Conqueror
11 years ago

@WayneK: I’m not saying you shouldn’t credit me, I’m just happy that someone remembers! Thank you for the kind words. It sound likely that our paths might have crossed at some point, I did hang around with Steve Middleton (Havok) and some other Ecstasy guys in London a few times. Do you know what he’s up to nowadays?As for Deep Core: Yes, the main coder was Sauron/Miracle, aka Johan Lindahl. As far as I can remember, Ringo Star was not involved in this production, but of course we had contact with him and many other local sceners. Ringo went on… Read more »

WayneK
11 years ago

Why wouldn’t I credit you?! You were one of the best around, which is why I picked your loader to rip in the first place 🙂  I believe I met you once even (with Steve from London, also known as Havok/Ecstasy) back in the day!  I have a question for you regarding the game this was ripped from (Deep Core) – who coded the game?  I saw many previews during it’s development, all of them came via Ringo…some of the levels even had tiles spelling things like “Classic Rules!” in the background.  Yet people tell me the game was coded… Read more »

Conqueror
Conqueror
11 years ago

Heh, cool to see that my old code still lives online after so many years. I have lost my disks and the source code long time ago, but apparently someone was nice enough to reverse engineer and publish it, and even giving me the original credit 🙂  Thanks!I remember that when I wrote this loader I tried to optimize it as much as possible in terms of length, and also make it 100% relocatable, even as assembled object code. It makes me happy to see that some people still can make use of this loader!Cheers,Conqueror (ex- Horizon, Fairlight, Agile, Quartex,… Read more »

WayneK
12 years ago

You need to ‘poke’ your MFMBUFF address into the ‘mfmaddr’ variable, and call the loader with:
A0 = load addr
A1 = pointer to filename

lea $50000,a0
lea filename(pc),a1
jsr conqload

filename: dc.b "lemmings.dat",0

That should do it!

0
scenex
12 years ago

/
do you remember the exact usage of the file loader?
i’m trying to load my ripped ‘Oh no more Lemmings’ files with it as you stated in your post, but it just jumps to track 80 then returns to track 0 and nothing happens..

0
StingRay
16 years ago

Hehe, IDA Pro is pretty cool. Though I still prefer to use ReSource for Amiga stuff. 🙂

0
WayneK
16 years ago

Yes, I admit it! It was either take my time to disasm it using Resource, or use IDA Pro to get it finished quickly and stop Musashi9 moaning at me on IRC… 🙂

0
StingRay
16 years ago

Seems like someone liked IDA Pro here. 😀

0
Authorization
*
*

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Registration
*
*
*

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Password generation

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

0
Would love your thoughts, please comment.x
()
x