mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-17 20:06:03 +00:00
65 lines
1.3 KiB
Plaintext
65 lines
1.3 KiB
Plaintext
;license:MIT
|
|
;(c) 2021-2022 by Frank M., qkumba
|
|
|
|
!cpu 6502
|
|
!to "build/PRELAUNCH.INDEXED/MAZEBLOX",plain
|
|
*=$106
|
|
|
|
!source "src/prelaunch/common.a"
|
|
|
|
+ENABLE_ACCEL
|
|
lda #<hook1
|
|
sta $A10+1
|
|
lda #>hook1
|
|
sta $A10+2
|
|
jmp $800 ; decompress1
|
|
|
|
hook1 lda #<hook2
|
|
sta $B747+1
|
|
lda #>hook2
|
|
sta $B747+2
|
|
jmp $B700 ; decompress2
|
|
|
|
hook2 lda #<hook3
|
|
sta $9E4D+1
|
|
lda #>hook3
|
|
sta $9E4D+2
|
|
ldx #0
|
|
stx $9E52
|
|
inx
|
|
stx $9E53 ; reset vector fix
|
|
jmp $9D84 ; decompress3
|
|
|
|
hook3 +READ_RAM2_NO_WRITE
|
|
lda MachineStatus
|
|
and #CHEATS_ENABLED
|
|
beq +
|
|
lda #<hook4
|
|
sta $BD07
|
|
lda #>hook4
|
|
sta $BD08
|
|
+
|
|
jsr DisableAccelerator
|
|
+READ_ROM_NO_WRITE
|
|
jmp $A180
|
|
|
|
hook4
|
|
pla
|
|
pla
|
|
jsr $BD5F
|
|
jsr $BD09
|
|
lda $B7EC
|
|
cmp #$13
|
|
bne +
|
|
lda $B7ED
|
|
cmp #5
|
|
bne +
|
|
lda #$AD
|
|
sta $1920 ; patch - don't decrease time
|
|
+ clc
|
|
rts
|
|
|
|
!if * > $1C0 {
|
|
!error "code is too large, ends at ", *
|
|
}
|