4cade/src/prelaunch/bruce.lee.a

64 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2019-09-14 05:30:01 +00:00
;license:MIT
2020-05-25 23:25:43 +00:00
;(c) 2019-2020 by qkumba
2019-09-14 05:30:01 +00:00
!cpu 6502
!to "build/PRELAUNCH.INDEXED/BRUCE.LEE",plain
2019-09-15 02:57:52 +00:00
*=$106
!source "src/macros.a"
2019-09-14 05:30:01 +00:00
2019-10-14 18:17:02 +00:00
+READ_RAM2_NO_WRITE
jsr EnableAccelerator
2020-05-25 23:25:43 +00:00
lda #$2c
2019-12-13 05:42:24 +00:00
sta $bb8
2019-10-14 18:17:02 +00:00
lda #<callback
2020-05-25 23:25:43 +00:00
sta $bb6
2019-10-14 18:17:02 +00:00
lda #>callback
2020-05-25 23:25:43 +00:00
sta $bb7
2019-10-14 18:17:02 +00:00
ldx #<cheat2
lda MachineStatus
and #CHEATS_ENABLED
beq +
ldx #<cheat1
2019-12-13 05:42:24 +00:00
+ stx $bec
2019-10-14 18:17:02 +00:00
lda #>cheat1
2019-12-13 05:42:24 +00:00
sta $bed
ldx #cheat_e - cheat
- lda cheat - 1, x
sta <(cheat1 - 1), x
dex
bne -
2019-10-14 18:17:02 +00:00
bit MachineStatus
bvs +
lda #$82
2019-12-13 05:42:24 +00:00
sta <(lcpatch + 1)
2019-10-14 18:17:02 +00:00
+
+READ_ROM_NO_WRITE
jmp $900
callback
+DISABLE_ACCEL
2020-05-25 23:25:43 +00:00
jsr $6000
2019-10-14 18:17:02 +00:00
jsr $7f8
+READ_RAM2_NO_WRITE
jsr EnableAccelerator
+READ_RAM1_WRITE_RAM1
2020-05-25 23:25:43 +00:00
rts
2019-10-15 02:31:22 +00:00
2019-12-13 05:42:24 +00:00
cheat !pseudopc $cf {
2019-10-15 02:31:22 +00:00
cheat1
lda #$2c
sta $8a7e
cheat2
lda $c083
jsr DisableAccelerator
lcpatch
lda $c08b
jmp $3800
}
2019-12-13 05:42:24 +00:00
cheat_e
2019-12-13 05:51:54 +00:00
!if * > $1C0 {
!error "code is too large, ends at ", *
}