2019-11-27 21:52:14 +00:00
|
|
|
;license:MIT
|
2022-05-27 23:29:52 +00:00
|
|
|
;(c) 2019-2022 by qkumba/Frank M.
|
2019-11-27 21:52:14 +00:00
|
|
|
|
|
|
|
!cpu 6502
|
2021-10-16 01:34:39 +00:00
|
|
|
!to "build/PRELAUNCH.INDEXED/SKYFOX",plain
|
2019-11-27 21:52:14 +00:00
|
|
|
*=$106
|
|
|
|
|
|
|
|
!source "src/prelaunch/common.a"
|
|
|
|
|
2022-05-27 23:29:52 +00:00
|
|
|
jmp +
|
|
|
|
|
|
|
|
callback2
|
|
|
|
jsr $BC03
|
|
|
|
lda #$85
|
|
|
|
ldx #$A5
|
|
|
|
cmp $7FB5
|
|
|
|
bne plane
|
|
|
|
stx $7FB5 ; patch - don't increase damage
|
|
|
|
stx $9327 ; patch - don't decrease fuel
|
|
|
|
|
|
|
|
plane
|
|
|
|
cmp $9BC7
|
|
|
|
bne nopatch
|
|
|
|
stx $156A ; patch - don't decrease fuel
|
|
|
|
stx $9281 ; patch - don't decrease fuel
|
|
|
|
stx $9BC7 ; patch - don't increase damage
|
|
|
|
|
|
|
|
callback1
|
|
|
|
sec
|
|
|
|
sbc #8
|
|
|
|
cmp #2
|
|
|
|
|
|
|
|
nopatch
|
|
|
|
lda #0
|
|
|
|
rts
|
|
|
|
|
|
|
|
+
|
2019-12-28 22:07:37 +00:00
|
|
|
+ENABLE_ACCEL
|
2019-12-29 19:33:40 +00:00
|
|
|
inc $80 ; requires a non-zero value for the RNG
|
2019-12-28 22:07:37 +00:00
|
|
|
lda #$60
|
2021-05-02 05:48:51 +00:00
|
|
|
sta $7E3A
|
|
|
|
jsr $4635
|
2019-12-29 19:33:40 +00:00
|
|
|
|
2022-05-27 23:29:52 +00:00
|
|
|
ldx #$82 ; READ_ROM_NO_WRITE
|
|
|
|
stx $101
|
|
|
|
ldx #$A6
|
|
|
|
stx $104
|
|
|
|
ldx #$FA
|
|
|
|
stx $105 ; update TR hook to reboot
|
2019-12-29 19:33:40 +00:00
|
|
|
sta $5FFC
|
2022-05-27 23:29:52 +00:00
|
|
|
sty $5FFD ; moved to LC $FFFC/D
|
2019-12-29 19:33:40 +00:00
|
|
|
|
2020-07-23 17:55:01 +00:00
|
|
|
lda #$4C
|
|
|
|
sta $6872
|
2022-05-27 23:29:52 +00:00
|
|
|
lda #<callback1
|
2020-07-23 17:55:01 +00:00
|
|
|
sta $6873
|
2022-05-27 23:29:52 +00:00
|
|
|
sty $6874
|
2020-07-23 17:55:01 +00:00
|
|
|
lda #$B0
|
|
|
|
sta $685B
|
|
|
|
lda #$90
|
|
|
|
sta $6862
|
2022-05-27 23:29:52 +00:00
|
|
|
+READ_RAM2_NO_WRITE
|
|
|
|
lda MachineStatus
|
|
|
|
and #CHEATS_ENABLED
|
|
|
|
beq +
|
|
|
|
lda #<callback2
|
|
|
|
sta $8882
|
|
|
|
sty $8883
|
|
|
|
+
|
|
|
|
jsr DisableAccelerator
|
|
|
|
+READ_ROM_NO_WRITE
|
2019-12-28 22:07:37 +00:00
|
|
|
jmp $67BD
|
2019-12-13 05:51:54 +00:00
|
|
|
|
|
|
|
!if * > $1C0 {
|
|
|
|
!error "code is too large, ends at ", *
|
|
|
|
}
|