4cade/src/demo/dung.beetles.a

67 lines
1.3 KiB
Plaintext
Raw Normal View History

;license:MIT
;(c) 2021 by Frank M.
!cpu 6502
!to "res/DEMO/DUNG.BEETLES",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 $603A
jsr $6000 ; decompress
lda #1
sta $083E ; reset vector patch
lda #$4C
sta $847
lda #0
sta $848
lda #$96 ; patch $847 - JMP ($3F2)
sta $849 ; to JMP $9600
lda #$60
sta $847
jsr $800 ; memory move
ldx #6-1
- lda patch, x
sta $9B93, x
dex
bpl - ; disable button support on title screen
lda #$4C
sta $9B7D
sta $97D5
lda #0
sta $9B7D+1
sta $97D5+1
lda #1
sta $9B7D+2
sta $97D5+2 ; set exits
lda #$D0
sta $1C17
sta $12CE
sta $9B4D
sta $9B56 ; disable sound
+DISABLE_ACCEL
jmp $9600
patch !byte $A9,$01,$EA,$EA,$EA,$EA
title !byte x_e-x_b
x_b !text "X/DUNG.BEETLES/DUNG.BEETLES"
x_e
!if * > $3F0 {
!error "code is too large, ends at ", *
}