4cade/src/prelaunch/minit.man.a
2020-04-27 12:15:11 -07:00

58 lines
1.1 KiB
Plaintext

;license:MIT
;(c) 2020 by qkumba
!cpu 6502
!to "build/PRELAUNCH/MINIT.MAN",plain
*=$106
!source "src/prelaunch/common.a"
jmp main
callback
jsr $BD57
ldx $B7EC
ldy $B7ED
cpx #$19
beq +
cpx #$18
bne ++
+ cpy #$0E
bne ++
lda #0
sta $BA48
rol
sta $BA4D ; hook in-game reset
++
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
beq +
cpx #$13
bne +
cpy #$03
bne +
lda #$a5
sta $BBD2 ; patch - don't decrease lives
+ rts
main
+ENABLE_ACCEL
lda #$60
sta $9FD
jsr $800 ; load DOS
lda #$A9
sta $BF24
lda #$01
sta $BF25 ; hook loader reset
lda #<callback
sta $BD26
lda #>callback
sta $BD27
+
+DISABLE_ACCEL
jmp $B700
!if * > $1C0 {
!error "code is too large, ends at ", *
}