2019-09-14 05:30:01 +00:00
|
|
|
;license:MIT
|
2020-06-29 18:57:03 +00:00
|
|
|
;(c) 2019-2020 by qkumba
|
2019-09-14 05:30:01 +00:00
|
|
|
|
|
|
|
!cpu 6502
|
2021-10-16 01:34:39 +00:00
|
|
|
!to "build/PRELAUNCH.INDEXED/DROL",plain
|
2019-09-15 02:57:52 +00:00
|
|
|
*=$106
|
|
|
|
|
|
|
|
!source "src/prelaunch/common.a"
|
2019-09-14 05:30:01 +00:00
|
|
|
|
2019-10-13 18:24:59 +00:00
|
|
|
+ENABLE_ACCEL
|
|
|
|
lda #$60
|
|
|
|
sta $4079
|
2019-10-05 01:34:49 +00:00
|
|
|
+GET_MACHINE_STATUS
|
|
|
|
and #CHEATS_ENABLED
|
|
|
|
sta store-$BF70+cheat_b+1
|
|
|
|
ldy #(cheat_e-cheat_b)-1
|
|
|
|
- lda cheat_b,y
|
|
|
|
sta $bf70,y
|
|
|
|
dey
|
|
|
|
bpl -
|
|
|
|
lda #$4c
|
|
|
|
sta $4215
|
|
|
|
lda #$70
|
|
|
|
sta $4216
|
|
|
|
lda #$bf
|
|
|
|
sta $4217
|
2019-10-13 18:24:59 +00:00
|
|
|
jsr $4000
|
|
|
|
jsr $40e0
|
2020-06-29 18:57:03 +00:00
|
|
|
lda $7fe ; Drol code
|
|
|
|
pha
|
2019-10-13 18:24:59 +00:00
|
|
|
+DISABLE_ACCEL
|
2020-06-29 18:57:03 +00:00
|
|
|
pla
|
|
|
|
sta $7fe ; overwritten by GS acceleration
|
2019-10-13 18:24:59 +00:00
|
|
|
jmp $407c
|
2019-09-16 21:12:21 +00:00
|
|
|
|
|
|
|
cheat_b !pseudopc $bf70 {
|
2019-10-05 01:34:49 +00:00
|
|
|
pla
|
|
|
|
sta jmp1+1
|
|
|
|
pla
|
|
|
|
sta jmp2+1
|
|
|
|
lda #>(patch-1)
|
|
|
|
pha
|
|
|
|
lda #<(patch-1)
|
|
|
|
pha
|
|
|
|
jmp ($8c00)
|
2019-09-14 05:30:01 +00:00
|
|
|
|
2019-09-16 21:12:21 +00:00
|
|
|
patch
|
2019-10-05 01:34:49 +00:00
|
|
|
lda #$24
|
|
|
|
ldy #$70
|
|
|
|
ldx $bf4a
|
|
|
|
beq store
|
|
|
|
ldy #$5e
|
|
|
|
dex
|
|
|
|
beq store
|
|
|
|
ldy #$00
|
|
|
|
dex
|
|
|
|
bne jmp2
|
2019-09-16 21:12:21 +00:00
|
|
|
|
|
|
|
store
|
2019-10-05 01:34:49 +00:00
|
|
|
ldx #0 ; SMC (will be non-zero if cheats are enabled)
|
|
|
|
beq +
|
|
|
|
sta $69b2,y
|
|
|
|
+
|
2019-09-16 21:12:21 +00:00
|
|
|
|
|
|
|
jmp2
|
2019-10-05 01:34:49 +00:00
|
|
|
lda #$d1
|
|
|
|
pha
|
2019-09-16 21:12:21 +00:00
|
|
|
|
|
|
|
jmp1
|
2019-10-05 01:34:49 +00:00
|
|
|
lda #$d1
|
|
|
|
pha
|
|
|
|
rts
|
2019-09-16 21:12:21 +00:00
|
|
|
}
|
2019-09-14 05:30:01 +00:00
|
|
|
cheat_e
|
2019-12-13 05:51:54 +00:00
|
|
|
|
|
|
|
!if * > $1C0 {
|
|
|
|
!error "code is too large, ends at ", *
|
|
|
|
}
|