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