4cade/src/prelaunch/thunder.bombs.a
2022-05-03 13:17:50 -07:00

71 lines
1.4 KiB
Plaintext

;license:MIT
;(c) 2019 by Frank M., 2022 by qkumba
!cpu 6502
!to "build/PRELAUNCH.INDEXED/THUNDER.BOMBS",plain
*=$106
!source "src/prelaunch/common.a"
lda #$60
sta $887F
lda #<fakewait
sta $8823+1
sta $882A+2
lda #>fakewait
sta $8823+2
sta $882B+2 ; fix timing of title screen on //gs
jsr $87F9 ; load, show title
+ENABLE_ACCEL
lda #$60
sta $7818
jsr $7800 ; unpack/setup
lda #0
sta $3F2 ; reset vector
+READ_RAM2_NO_WRITE
lda MockingboardStuff
beq ++
tax
and #7
ora #$C0
sta $341
txa
ldy #6 ; sound/speech
asl
bcs +
ldy #4 ; sound ii
asl
bmi +
dey ; sound i
+
sty $340
jsr $7CB4
++
lda MachineStatus
and #CHEATS_ENABLED
beq +
lda #$AD
sta $E39 ; don't decrease lives
+
jsr DisableAccelerator
+READ_ROM_NO_WRITE
lda $323
jmp $781B
fakewait sec
wait1 pha
wait2 sbc #$01
bne wait2
pla
sbc #$01
bne wait1
rts
!if * > $1C0 {
!error "code is too large, ends at ", *
}