mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-23 12:33:32 +00:00
Quit to TR and add cheat for Castle Smurfenstein (#169)
This commit is contained in:
parent
a78e1d16b5
commit
f3abc8731e
@ -44,7 +44,7 @@
|
||||
0001,CANNONBALL.BLTZ=Cannonball Blitz
|
||||
0001,CANYON.CLIMBER
|
||||
0000,CAPTN.GOODNIGHT=Captain Goodnight
|
||||
0000,SMURFEN=Castle Smurfenstein
|
||||
0002,SMURFEN=Castle Smurfenstein
|
||||
0002,WOLFEN84=Castle Wolfenstein
|
||||
1001,CAVRNS.CALLISTO=Caverns of Callisto
|
||||
1001,CEILING.ZERO
|
||||
|
@ -1,5 +1,5 @@
|
||||
;license:MIT
|
||||
;(c) 2020 by qkumba/Frank M.
|
||||
;(c) 2020 by qkumba/Frank M./Tom Greene
|
||||
|
||||
!cpu 6502
|
||||
!to "build/PRELAUNCH/SMURFEN",plain
|
||||
@ -19,18 +19,47 @@
|
||||
jmp $B700
|
||||
|
||||
callback
|
||||
+READ_RAM2_WRITE_RAM2
|
||||
lda #0
|
||||
sta $9E52
|
||||
sta $FFFC
|
||||
lda #1
|
||||
sta $9E53
|
||||
sta $FFFD ; reset vector patch
|
||||
+READ_ROM_NO_WRITE
|
||||
|
||||
lda #$00 ; intercept BRUN command before
|
||||
sta $A395 ; it jumps to the loaded file
|
||||
lda #$03
|
||||
sta $A396
|
||||
|
||||
ldx #patchend-patch
|
||||
- lda patch,x ; The game code has a stack leak and will
|
||||
sta $0300,x ; clobber all of page 1 after repeated plays
|
||||
dex ; so move the patch code to page 3
|
||||
bpl -
|
||||
|
||||
+DISABLE_ACCEL
|
||||
jmp $9B00
|
||||
|
||||
patch
|
||||
!word $0302
|
||||
|
||||
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
|
||||
ldx #$2C
|
||||
stx $14AD ; don't decrement bullets
|
||||
stx $1999 ; or grenades
|
||||
|
||||
+ jmp ($AA72) ; finally jump to the loaded file
|
||||
patchend
|
||||
|
||||
!if * > $1C0 {
|
||||
!error "code is too large, ends at ", *
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user