INCDIR "Include:" INCLUDE whdload.i _base SLAVE_HEADER ;ws_Security + ws_ID dc.w 7 ;ws_Version dc.w WHDLF_NoError|WHDLF_EmulTrap ;ws_flags dc.l $80000 ;ws_BaseMemSize dc.l $0 ;ws_ExecInstall dc.w _Start-_base ;ws_GameLoader dc.w 0 ;ws_CurrentDir dc.w 0 ;ws_DontCache _keydebug dc.b 0 ;ws_keydebug _keyexit dc.b 0 ;ws_keyexit = F10 dc.b '$VER: Pitfighter HD V1.1 by Bored Seal',0,0 _Start lea (_resload,pc),a1 move.l a0,(a1) ;save for later using move.l #$400,d0 ;load boot and check version move.l #$1600,d1 clr.l d2 bsr Loader CheckVer lea $400,a0 move.l #$1600,d0 move.l (_resload,pc),a2 jsr (resload_CRC16,a2) lea ver,a3 move.w d0,(a3) cmp.w #$73FD,d0 beq ChrisBoot cmp.w #$B4AC,d0 bne Unsupported CondorBoot move.l #$400,d0 move.l #1*$1600,d1 moveq #$16,d2 bsr Loader bra Patch ChrisBoot move.l #$400,d0 move.l #1*$1600,d1 moveq #$b,d2 bsr Loader Patch move.w #$4ef9,$f76 pea Loader move.l (sp)+,$f78 pea Patch1 move.l (sp)+,$1232 jmp $400 Patch1 move.w #$4ef9,$3a2c pea Loader move.l (sp)+,$3a2e pea Patch2 move.l (sp)+,$58ec bra Run2000 Patch2 move.w #$4ef9,$7ec90 pea Patch3 move.l (sp)+,$7ec92 jmp $7ec78 Patch3 move.w #$4ef9,$2624 pea Loader move.l (sp)+,$2626 move.l a3,-(sp) lea ver,a3 cmp.w #$73FD,(a3) beq ChrisProt move.w #$4ef9,$22ea ;crack RNC protection pea CondorCrack move.l (sp)+,$22ec bra Run2000 ChrisProt pea ChrisCrack move.l (sp)+,$22ec Run2000 jmp $2000 CondorCrack move.w #$4e71,$e9c8 ;fix snoop mode jmp $914c ChrisCrack move.w #$4e71,$e9ae ;fix clr.w $dff000 jmp $9136 Loader MOVEM.L D0-D7/A0-A6,-(SP) MOVEA.L D0,A0 MOVE.L D2,D0 MULU.W #$200,D0 MOVEQ #1,D2 cmp.l #'GOD1',d3 bne nodisk2 moveq #2,d2 nodisk2 MOVEA.L (_resload,PC),A6 JSR (resload_DiskLoad,A6) MOVEM.L (SP)+,D0-D7/A0-A6 MOVEQ #0,D0 RTS Unsupported pea TDREASON_WRONGVER move.l (_resload),-(a7) add.l #resload_Abort,(a7) rts _resload dc.l 0 ;address of resident loader ver dc.w 0