mirror of
https://github.com/a2-4am/4cade.git
synced 2024-10-20 03:24:29 +00:00
68 lines
1.5 KiB
Plaintext
Executable File
68 lines
1.5 KiB
Plaintext
Executable File
;license:MIT
|
|
;(c) 2019-20 by qkumba/Frank M./Tom Greene
|
|
|
|
!cpu 6502
|
|
!to "build/PRELAUNCH.INDEXED/CW",plain
|
|
*=$106
|
|
|
|
!source "src/prelaunch/common.a"
|
|
|
|
jmp main
|
|
|
|
brunpatch
|
|
lda $AA76 ; check second character of filename
|
|
cmp #$C9 ; = I, filename = @INIT
|
|
bne +
|
|
|
|
ldx #$01 ; Patch it to return to TR
|
|
stx $0DFF ; instead of exiting to BASIC
|
|
|
|
inc $0D87 ; prevent language card detection
|
|
|
|
+ cmp #$D7 ; = W, filename = @WOLF
|
|
bne ++
|
|
|
|
+GET_MACHINE_STATUS
|
|
and #CHEATS_ENABLED
|
|
beq ++
|
|
ldx #$03
|
|
stx $4048 ; start with 3 grenades
|
|
ldx #$2C
|
|
stx $1435 ; don't decrement bullets
|
|
stx $18FE ; or grenades
|
|
|
|
++ jmp ($AA72) ; finally jump to the loaded file
|
|
patch
|
|
!word brunpatch
|
|
|
|
main
|
|
+ENABLE_ACCEL
|
|
+USES_TEXT_PAGE_2
|
|
lda #$60
|
|
sta $21D8
|
|
jsr $2000 ; find and load "DOS"
|
|
lda #<callback
|
|
sta $B748
|
|
lda #>callback
|
|
sta $B749
|
|
jmp $B700
|
|
|
|
callback
|
|
ldx #$00
|
|
stx $9E52
|
|
inx
|
|
stx $9E53
|
|
|
|
lda #<patch ; intercept BRUN command before
|
|
sta $A395 ; it jumps to the loaded file
|
|
lda #>patch
|
|
sta $A396
|
|
|
|
+DISABLE_ACCEL
|
|
jmp $9D84
|
|
|
|
|
|
!if * > $1C0 {
|
|
!error "code is too large, ends at ", *
|
|
}
|