4cade/src/prelaunch/slicks.a
2022-07-07 11:43:08 -07:00

52 lines
1.1 KiB
Plaintext

;license:MIT
;(c) 2020, 2022 by qkumba/Frank M.
!cpu 6502
!to "build/PRELAUNCH.INDEXED/SLICKS",plain
*=$106
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
inc $3F4 ; force reboot
lda #$60
sta $5612
jsr $800 ; decompress
lda #$88
sta $BF0E ; don't bank out
+READ_RAM2_NO_WRITE
lda MockingboardStuff
and #7
cmp #1
ora #$C0
bcc skipmb
inc $8EE8 ;select MB
cmp #$C4
beq skipmb
ldy #0
- ldx $1D77,Y ;find #$C4s
cpx #$C4
bne +
sta $1D77,Y ;Replace #$C4 with detected slot
+ ldx $1E77,Y ;find #$C4s
cpx #$C4
bne +
sta $1E77,Y ;Replace #$C4 with detected slot
+ iny
bne -
skipmb
lda #$2C
sta $974C ; skip reset vector subroutine
jsr DisableAccelerator
+READ_ROM_NO_WRITE
jmp $803
!if * > $1C0 {
!error "code is too large, ends at ", *
}