2020-05-07 21:26:16 -04:00
|
|
|
;license:MIT
|
|
|
|
;(c) 2020 by Tom Greene
|
|
|
|
|
|
|
|
!cpu 6502
|
2021-10-15 21:34:39 -04:00
|
|
|
!to "build/PRELAUNCH.INDEXED/DANGEROUS.DAVE",plain
|
2020-05-07 21:26:16 -04:00
|
|
|
*=$106
|
|
|
|
|
|
|
|
!source "src/prelaunch/common.a"
|
|
|
|
|
|
|
|
+ENABLE_ACCEL
|
|
|
|
lda #$60 ; patch loader to return
|
|
|
|
sta $20C6
|
2020-05-22 00:24:35 -04:00
|
|
|
|
|
|
|
; auto-patch lowercase on II+
|
|
|
|
+ lda ROM_MACHINEID
|
|
|
|
cmp #$06
|
|
|
|
beq +
|
|
|
|
lda #<casefix
|
|
|
|
sta $2390
|
|
|
|
lda #>casefix
|
|
|
|
sta $2391
|
|
|
|
|
|
|
|
+ jsr $2000
|
2020-05-07 21:26:16 -04:00
|
|
|
|
|
|
|
+GET_MACHINE_STATUS
|
|
|
|
and #CHEATS_ENABLED
|
|
|
|
beq +
|
|
|
|
ldx #$2C
|
|
|
|
stx $8A61 ; don't decrement lives
|
|
|
|
|
|
|
|
+
|
|
|
|
; the game calls the Applesoft RND function in ROM
|
|
|
|
; so we need to copy the seed into ZP, otherwise it
|
|
|
|
; will get stuck in an infinite loop
|
|
|
|
ldx #$04
|
|
|
|
- lda seed,x
|
|
|
|
sta $C9,x
|
|
|
|
dex
|
|
|
|
bpl -
|
|
|
|
|
|
|
|
+DISABLE_ACCEL
|
|
|
|
jmp $20EC
|
|
|
|
|
2020-05-22 00:24:35 -04:00
|
|
|
casefix
|
|
|
|
cmp #$E1
|
|
|
|
bcc +
|
|
|
|
and #$DF
|
|
|
|
+ jsr ROM_COUT
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
2020-05-07 21:26:16 -04:00
|
|
|
seed
|
|
|
|
!byte $80, $4F, $C7, $52, $FF
|
|
|
|
|
|
|
|
|
|
|
|
!if * > $1C0 {
|
|
|
|
!error "code is too large, ends at ", *
|
|
|
|
}
|