;Parallax boot block ;~~~~~~~~~~~~~~~~~~~ ;(c) 1992 Simon Cooke ;Loads in the Parallax DOS from the protected area of the disc. ;Apparently this protection took some really good hacker friends of mine ;24 hours to break, in a non-stop stint!!! I was most impressed, seeing that ;every other protection system on the SAM takes roughly half an hour at the ;most... ;Chris White's Lemmings protection was cracked by me in 2.5 minutes (I have ;witnesses!!!) ORG &8000 DUMP &8000 DEFM "AMIGADOS+" ;confuddle hackers start: DI LD HL,blank.pos LD DE,blank.pos+1 LD BC,&8200-blank.pos LD (HL),0 LDIR blank.pos: DEFM "This is a non-dos disc." ;more hacker confusion DEFB 23,4,1,2,4,5,3,56,34,78,54,123,4,34,230 DEFB 255 DEFM "Checksum validation error." DEFB 23,4,1,2,4,5,3,56,34,78,54,123,4,34,230 DEFB 255 DEFM "PARALLAX  FRED PUBLISHING " DEFB 24,67,129,55,230,231,232,12,255 DEFM "Please insert disc in df0:" DEFB 23,4,1,2,4,5,3,56,34,78,54,123,4,34,230 DEFB 255 DEFM "Retry|Cancel" DEFB 255 DEFM "Amiga Dos v2.3" DEFB 255 DEFM " Parallax  1992 Fred " DEFM "Publishing... protection system desynch" DEFM " - v1.04d 1992 Simon Cooke " DEFM "look out for entropy stuff!!! " ORG &8100 DUMP &8100 DEFM "BOO" DEFB "T"+128 ORG &8200 DUMP &8200 NOP IN A,(&FC) AND 31 OR 32 OUT (&FA),A LD HL,0 LD DE,1 LD BC,&5FFF LD (HL),L LDIR ;clear screen. LD A,31 OUT (&FA),A ;page in screen area LD SP,&C000 ;set stack LD BC,&10F8 ;blank the palette XOR A blank.loop: OUT (C),A DJNZ blank.loop OUT (&FE),A ;set border to zero, screen ON wait.nb: IN A,(&E0) ;wait for drive to be not busy. BIT 0,A JP NZ,wait.nb LD HL,&4000 LD A,%00000011 ;restore drive to track 0 OUT (224),A LD B,20 DJNZ $ ;Read DOS from the disc into memory. Reads it over the BASIC system area. wait.nb3: IN A,(&E0) BIT 0,A JP NZ,wait.nb3 LD A,128 OUT (225),A LD A,&02 OUT (226),A CALL read.sector LD A,3 OUT (226),A CALL read.sector LD A,4 OUT (226),A CALL read.sector LD A,5 OUT (226),A CALL read.sector LD A,1 OUT (226),A CALL step.in CALL read.sector LD A,2 OUT (226),A CALL read.sector LD A,3 OUT (226),A CALL read.sector LD A,4 OUT (226),A CALL read.sector LD A,5 OUT (226),A CALL read.sector LD SP,&8000 JP &4000 step.in: IN A,(224) BIT 0,A JP NZ,step.in LD A,%01000011 OUT (224),A LD B,20 DJNZ $ not.fin.step: IN A,(224) BIT 0,A JP NZ,not.fin.step LD A,&80 OUT (225),A RET read.sector: LD B,5 error.loop: PUSH BC read.wait: IN A,(224) BIT 0,A JP NZ,read.wait LD A,128 OUT (225),A LD C,227 LD A,%10000000 OUT (224),A LD B,20 DJNZ $ JR wait.read read.data: INI wait.read: IN A,(224) BIT 1,A JR NZ,read.data wait.read2: RRCA JR C,wait.read POP BC AND %00001110 RET Z DJNZ error.loop LD E,32 ;if there's an error in reading, LD C,&F8 ;flash the screen RED. error.one: LD B,50 frame.wait: IN A,(&F9) BIT 3,A JP NZ,frame.wait DJNZ frame.wait LD BC,&00F8 LD A,E XOR 32 LD E,A OUT (C),A JP error.one