mirror of
https://github.com/a2-4am/4cade.git
synced 2025-01-02 06:30:47 +00:00
79 lines
1.7 KiB
Plaintext
79 lines
1.7 KiB
Plaintext
;license:MIT
|
|
;(c) 2020 by qkumba/Frank M./Tom Greene
|
|
|
|
!cpu 6502
|
|
!to "build/PRELAUNCH/CS",plain
|
|
*=$106
|
|
|
|
!source "src/prelaunch/common.a"
|
|
|
|
jmp main
|
|
|
|
brunpatch
|
|
ldx #$FF
|
|
txs
|
|
lda $AA76 ; check second character of filename
|
|
cmp #$D7 ; = W, filename = @WOLF
|
|
bne +
|
|
|
|
ldx #$01 ; Patch it to return to TR
|
|
stx $1EFA ; instead of exiting to BASIC
|
|
|
|
+GET_MACHINE_STATUS
|
|
and #CHEATS_ENABLED
|
|
beq +
|
|
ldx #$03
|
|
stx $4048 ; start with 3 grenades
|
|
dec $14AD ; don't decrement bullets
|
|
dec $1999 ; or grenades
|
|
|
|
+ jmp ($AA72) ; finally jump to the loaded file
|
|
patch
|
|
!word brunpatch
|
|
|
|
main
|
|
+ENABLE_ACCEL
|
|
|
|
lda ROM_MACHINEID
|
|
cmp #$06
|
|
beq +
|
|
|
|
lda #$E9
|
|
sta $36
|
|
lda #$BD
|
|
sta $37
|
|
|
|
+ sec
|
|
jsr $FE1F ; check for IIgs
|
|
bcs ++
|
|
jsr ROM_TEXT2COPY ; set alternate display mode on IIgs (required for some games)
|
|
++
|
|
|
|
lda #$60
|
|
sta $A0B
|
|
jsr $800 ; find and load "DOS"
|
|
lda #<callback
|
|
sta $B748
|
|
lda #>callback
|
|
sta $B749
|
|
jmp $B700
|
|
|
|
callback
|
|
ldx #0
|
|
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 $9B00
|
|
|
|
|
|
!if * > $1C0 {
|
|
!error "code is too large, ends at ", *
|
|
}
|