ORG $4000 RANDOM EQU $EFAE PTR EQU $FE VTAB EQU $F259 HTAB EQU $F7EA MLI EQU $BF00 BUFFER EQU $1000 PARMS EQU $0300 * * -> ProDOS Cheat & Cracker Maker v1.0 <- * * This is a pre-release of an already started program. * The program already started will take quite a bit of * time to complete, so this program is being written * as a temporary replacement. * * Data at the end of the file is organized as such: * * Byte #1: I)nstall or R)emove (0=Install, 1=Remove) * #2: Picture (0=No, 1=Yes) * #3: 'to' data * #4: 'from' data * #5: 'byte'... etc * LDA MLI ;Check to see if we're in ProDOS CMP #$4C BEQ OKAY JSR PRINT HEX 8D8D87 ASC "?ERROR RUN UNDER PRODOS ONLY",00 JMP $3D0 OKAY LDA $C000 BIT $C010 EOR #$DC EOR #$CD CMP #$95 BEQ STARS JMP PICTURE *------------------------------- * The following displays a random * generation of a background full * of stars. *------------------------------- STARS JSR $FC58 LDA #$00 ;Start at location $400 STA $01 LDA #$04 STA $02 STAR1 LDA #$0A ;Amount of stars per location STA $00 STAR JSR RANDOM LDA #$AE ;ASCII value for a period (star) LDY $A1 ;Random byte STA ($01),Y ;Print the star DEC $00 ;Decrement star counter BNE STAR ;Not done with this address INC $02 ;Next address (hi value) LDA $02 CMP #$08 ;Are we done yet? BNE STAR1 ;No, start next address LDX #9 JSR VTAB LDX #7 JSR HTAB JSR PRINT ASC "ProDOS Cheat & Cracker v1.0",00 LDX #10 JSR VTAB LDX #17 JSR HTAB JSR PRINT ASC "by -DC-",00 LDX #14 JSR VTAB LDX #11 JSR HTAB JSR PRINT ASC "Shooting Star 21mg",00 LDX #15 JSR VTAB LDX #14 JSR HTAB JSR PRINT ASC "206/838-7686",00 LDX #24 JSR VTAB LDX #16 JSR HTAB JSR PRINT ASC "05/31/89",00 LDA #$00 LDX #$FF LDY #$DA STA $904C STX $1C9B STY $1C9C SOUND2 LDA $904C LDX $1C9C JSR SOUND4 LDA $C000 BMI SOUND3 INC $904C LDA $904C CMP $1C9B BCC SOUND2 SOUND3 BIT $C010 JMP PICTURE SOUND4 STA $7083 STX $7084 SOUND5 LDX $7085 LDY $FA00,X SOUND6 DEY BNE SOUND6 LDA $C030 LDY $7083 BEQ SOUND8 SOUND7 DEY BNE SOUND7 SOUND8 LDA $C030 DEC $7085 DEC $7084 BNE SOUND5 RTS *------------------------------- PICTURE LDA PICDATA BEQ BEGIN BIT $C052 BIT $C054 BIT $C057 BIT $C050 BIT $C010 PIC LDA $C000 BPL PIC BIT $C051 *------------------------------- BEGIN LDA #$00 STA $3F6 ;Ampersand Vector (lo byte) LDA #$40 STA $3F7 ;Ampersand Vector (hi byte) JSR $FC58 JSR PRINT DS 160,$20 ASC "----------------------------------------" ASC " Created with ProDOS Cheat Maker v1.0 " ASC " Call Shooting Star at 206/838-7686 " ASC "----------------------------------------",00 JSR PRINT HEX 8D8D ASC " ",8D00 BIT $C010 KEY3 LDA $C000 CMP #$80 BMI KEY3 BIT $C010 JSR PRINT HEX 8D8D ASC "Scanning disk...",00 JMP SCANDISK *------------------------------- * This subroutine reads in a * block off the disk *------------------------------- START LDA #TODATA STA $01 LDA #$03 STA PARMS LDA $BF30 STA PARMS+1 LDA #BUFFER STA PARMS+3 LOOP LDY #$04 ;Block location LDA ($00),Y STA PARMS+4 INY LDA ($00),Y STA PARMS+5 JSR MLI DB $80 DB #PARMS BCC LOOP1 JMP ERROR LOOP1 LDY #$02 LDA ($00),Y ;Get lo byte of BYTE to change CLC ADC #BUFFER STA $03 CLC ;Used as a marker RTS *------------------------------- SCANDISK JSR START SCAN2 LDY #$00 ;(Y reg not really used) LDA ($02),Y ;Get byte out of buffer LDY INSDATA CMP ($00),Y ;Are they the same? BNE NOTSAME JSR CONT ;Reads in new byte BCS WRITE ;We've checked them all JMP SCAN2 *------------------------------- NOTSAME INC INSDATA LDA INSDATA CMP #$02 BNE SCANDISK JMP ERROR1 ;Not the correct disk *------------------------------- * The following checks for two $DC bytes * to see if the program's done *------------------------------- CONT LDA $00 CLC ADC #$06 STA $00 LDA $01 ADC #$00 STA $01 LDY #$00 LDA ($00),Y CMP #$DC BEQ READ4 JMP LOOP ;Not done yet READ4 INY LDA ($00),Y CMP #$DC BEQ ALLDONE JMP LOOP ;Not done yet ALLDONE SEC ;Used as a marker RTS *------------------------------- * The following routine writes * the new bytes to the disk *------------------------------- WRITE LDA INSDATA (1=Install, 0=Remove [Backwards, yes]) BEQ NOTINS JSR PRINT ASC "currently not installed.",00 DEC INSDATA ;Set it to Install JMP CHK1 NOTINS JSR PRINT ASC "currently installed.",8D00 INC INSDATA ;Set it to Remove * CHK1 JSR START ;Read in first block & byte WRITE1 LDY INSDATA LDA ($00),Y ;Get the correct byte LDY #$00 STA ($02),Y ;Write over old byte JSR MLI DB $81 ;WRITE_BLOCK DB #PARMS BCS ERROR JSR CONT BCS END JMP WRITE1 *------------------------------- ERROR STA $00 ;Temporary error # storage JSR PRINT HEX 8D8D ASC "MLI Error $",00 LDA $00 JSR $FDDA ;Print it in hex value JSR PRINT ASC " -- Program Terminated",8D8D00 JMP $3D0 ;Return to ProDOS * ERROR1 JSR PRINT ASC "error!",8D8D ASC "This is not the correct disk.",8D ASC "Program Terminated.",8D8D00 RTS *------------------------------- END JSR PRINT HEX 8D8D ASC " -%> Changes Completed <%-",8D8D00 RTS ;Return to ProDOS *=============================== PRINT PLA STA PTR PLA STA PTR+1 LDY #$01 PRINT2 LDA (PTR),Y BEQ PRINT3 JSR $FDED INY BNE PRINT2 INC PTR+1 BNE PRINT2 PRINT3 CLC TYA ADC PTR STA PTR LDA PTR+1 ADC #$00 PHA LDA PTR PHA RTS *=============================== INSDATA DB $00 PICDATA DB $00 TODATA DB $00 FRODATA DB $00 BYTDATA HEX 0000 (lo, hi) BLODATA HEX 0000 (lo, hi) *===============================