4cade/src/prelaunch/flobynoid.a

76 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

2022-05-05 05:36:52 +00:00
;license:MIT
;(c) 2022 by qkumba
!cpu 6502
!to "build/PRELAUNCH.INDEXED/FLOBYNOID",plain
*=$106
!source "src/macros.a"
2022-05-05 05:36:52 +00:00
+ENABLE_ACCEL
lda #$60
sta $9C5
jsr $800 ; decompress
lda #$60
sta $B624
sta $B63A
jsr $B600
2022-05-06 05:06:50 +00:00
ldx #hook_e-hook_b
- lda hook_b, x
2022-06-26 21:53:50 +00:00
sta $2c8, x
2022-05-06 05:06:50 +00:00
dex
bpl -
2022-06-26 21:53:50 +00:00
lda #$c8
2022-05-06 05:06:50 +00:00
sta $B6D6
lda #2
sta $B6D7
2022-07-31 19:50:56 +00:00
lda MachineStatus
and #CHEATS_ENABLED
beq +
lda #$8E ; STX
sta cheat1
sta cheat2
sta cheat3
+ jsr DisableAccelerator
2022-05-05 05:36:52 +00:00
jsr $BBB3
jsr $B627
inc $3F4 ; reboot
jmp $8003
2022-06-26 21:53:50 +00:00
hook_b !pseudopc $2c8 {
2022-05-06 05:06:50 +00:00
pla
pla
jsr $B64F
jsr $B6D8
ldx #$AD
lda #$CE
cmp $AD9
bne +
2022-07-31 19:50:56 +00:00
cheat1 cpx $AD9 ; SMC patch - don't decrease lives
2022-05-06 05:06:50 +00:00
+ cmp $1461
bne +
2022-07-31 19:50:56 +00:00
cheat2 cpx $1461 ; patch - don't trigger anti-cheat
2022-05-06 05:06:50 +00:00
+ lda $1893
cmp #$EE
bne +
2022-07-31 19:50:56 +00:00
cheat3 cpx $1893 ; SMC patch - don't increase lives
+ lda $B088
2022-06-26 21:53:50 +00:00
eor #$0D
bne +
sta $B088 ; patch - don't trigger anti-tamper
2022-05-06 05:06:50 +00:00
+ clc
rts
!if * > $2FF {
!error "code is too large, ends at ", *
}
}
hook_e
2022-05-05 05:36:52 +00:00
!if * > $1C0 {
!error "code is too large, ends at ", *
}