4cade/src/prelaunch/minit.man.a

58 lines
1.1 KiB
Plaintext
Raw Normal View History

2020-04-26 21:01:30 +00:00
;license:MIT
2020-04-27 19:15:11 +00:00
;(c) 2020 by qkumba
2020-04-26 21:01:30 +00:00
!cpu 6502
!to "build/PRELAUNCH/MINIT.MAN",plain
*=$106
!source "src/prelaunch/common.a"
2020-04-27 19:15:11 +00:00
jmp main
2020-04-26 21:01:30 +00:00
2020-04-27 19:15:11 +00:00
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
++
2020-04-26 21:01:30 +00:00
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
beq +
2020-04-27 19:15:11 +00:00
cpx #$13
bne +
cpy #$03
bne +
2020-04-26 21:01:30 +00:00
lda #$a5
2020-04-27 19:15:11 +00:00
sta $BBD2 ; patch - don't decrease lives
+ rts
2020-04-27 14:22:02 +00:00
2020-04-27 19:15:11 +00:00
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
+
2020-04-26 21:01:30 +00:00
+DISABLE_ACCEL
jmp $B700
!if * > $1C0 {
!error "code is too large, ends at ", *
}