4cade/src/demo/pest.patrol.a

56 lines
1.1 KiB
Plaintext
Raw Normal View History

;license:MIT
;(c) 2021 by Frank M.
!cpu 6502
!to "res/DEMO/PEST.PATROL",plain
*=$300
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_AT title, $00
lda #$60
sta $0837
jsr $0800 ; decompress
ldx #11-1
- lda patch, x
sta $47BA, x
dex
bpl - ; exit when user presses a key during main menu
lda #$4C
sta $57C4
sta $5589
sta $B493
lda #0
sta $57C4+1
sta $5589+1
sta $485A ; disable sound
sta $48AE ; disable sound
lda #1
sta $57C4+2
sta $5589+2
lda #$BD
sta $B493+1
lda #$47
sta $B493+2 ; set exits
+DISABLE_ACCEL
jmp $4003
title !byte x_e-x_b
x_b !text "X/PEST.PATROL/PEST.PATROL"
x_e
patch !byte $4C,$00,$01,$AD,$00,$C0,$30,$F8,$4C,$90,$B3
!if * > $3F0 {
!error "code is too large, ends at ", *
}