2022-03-01 17:37:58 +00:00
|
|
|
;license:MIT
|
|
|
|
;(c) 2022 by qkumba
|
|
|
|
|
|
|
|
!cpu 6502
|
|
|
|
!to "build/PRELAUNCH.INDEXED/VIPER.PATROL",plain
|
|
|
|
*=$106
|
|
|
|
|
|
|
|
!source "src/prelaunch/common.a"
|
|
|
|
|
|
|
|
lda #$4C
|
|
|
|
sta $948E
|
2022-05-19 17:42:44 +00:00
|
|
|
lda #<callback1
|
2022-03-01 17:37:58 +00:00
|
|
|
sta $948F
|
2022-05-19 17:42:44 +00:00
|
|
|
lda #>callback1
|
2022-03-01 17:37:58 +00:00
|
|
|
sta $9490
|
|
|
|
jmp $5200 ; load "DOS"
|
|
|
|
|
2022-05-19 17:42:44 +00:00
|
|
|
callback1
|
2022-03-01 17:37:58 +00:00
|
|
|
+ENABLE_ACCEL
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
sta $56
|
|
|
|
jsr $BDAC ; decompress
|
2022-05-19 17:42:44 +00:00
|
|
|
lda $1B82
|
|
|
|
cmp #$4C
|
|
|
|
bne +
|
|
|
|
lda #<callback2
|
|
|
|
sta $1B83
|
|
|
|
lda #>callback2
|
|
|
|
sta $1B84
|
|
|
|
lda #<callback3
|
|
|
|
sta $1BCA
|
|
|
|
lda #>callback3
|
|
|
|
sta $1BCB
|
|
|
|
+
|
2022-03-01 17:37:58 +00:00
|
|
|
+DISABLE_ACCEL
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
rts
|
|
|
|
|
2022-05-19 17:42:44 +00:00
|
|
|
callback2
|
|
|
|
lda #$A5
|
|
|
|
sta $B7D ; patch - don't increase lives
|
|
|
|
sta $B8B ; patch - don't decrease lives
|
|
|
|
lda #$EA
|
|
|
|
sta $C39 ; patch - don't decrease fuel
|
|
|
|
bne +
|
|
|
|
|
|
|
|
callback3
|
|
|
|
dec $100C ; patch - don't increase lives
|
|
|
|
dec $101A ; patch - don't decrease lives
|
|
|
|
+ jmp $800
|
|
|
|
|
2022-03-01 17:37:58 +00:00
|
|
|
!if * > $1C0 {
|
|
|
|
!error "code is too large, ends at ", *
|
|
|
|
}
|