;license:MIT ;(c) 2021-2022 by Frank M., qkumba !cpu 6502 !to "build/DEMO/APPLE.INVADER#060200",plain *=$200 !source "src/constants.a" ; no code in these !source "src/macros.a" +GAME_REQUIRES_JOYSTICK lda $7fe pha +ENABLE_ACCEL_LC pla sta $7fe ; overwritten by GS acceleration +LOAD_XSINGLE title lda #$60 sta $6020 jsr $6002 ; decompress ldx #$D8 ; move location from $3F2 to $3D8 stx $1113 ; (program uses reset vector for storage) stx $1245 stx $4A2C stx $4A34 stx $4A41 stx $5A9C stx $5AA4 stx $5AB1 stx $5A9C inx ; move location from $3F3 to $3D9 stx $1FA0 stx $4A31 stx $4F4D stx $5AA1 inx ; move location from $3F4 to $3DA stx $11AF stx $1824 stx $19DF stx $1DE8 stx $1E5A ; reset vector fix lda #$4C sta $46C0 ldx #0 stx $46C0+1 stx $4A96 ; (moved to $1E37+1) inx stx $46C0+2 ; exit on keypress stx $4A9B ; exit at end of demo loop (moved to $1E37+2) lda $7fe pha +DISABLE_ACCEL pla sta $7fe ; overwritten by GS acceleration jmp $5F00 title !byte x_e-x_b x_b !text "APPLE.INVADER" x_e !if * > $300 { !error "code is too large, ends at ", * }