quit to TR and add cheat for Beyond Wolfenstein (#160)

This commit is contained in:
Tom Greene 2020-04-12 22:44:59 -04:00 committed by GitHub
parent 7ae5fb3e84
commit 7353770b67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 7 deletions

View File

@ -26,7 +26,7 @@
0100,BEJEWELED
0000,BELLHOP
0001,BERZAP
0000,BEYOND.WOLFEN=Beyond Castle Wolfenstein
0002,BEYOND.WOLFEN=Beyond Castle Wolfenstein
0000,BUDGETRILOGY=Bill Budge's Trilogy
1000,BLACK.MAGIC
0000,BLISTER.BALL

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by qkumba
;(c) 2019-2020 by qkumba/Tom Greene
!cpu 6502
!to "build/PRELAUNCH/BEYOND.WOLFEN",plain
@ -18,19 +18,50 @@
sta $B749
jmp $B700
reset
+READ_ROM_NO_WRITE
jmp $FAA6
callback
lda #>reset
lda #$01
sta $9E31
lda #<reset
lda #$00
sta $9E3C ; reset vector patch
lda #<patch ; intercept BRUN command before
sta $A395 ; it jumps to the loaded file
lda #>patch
sta $A396
+DISABLE_ACCEL
jmp $9D84
patch
!word brunpatch
brunpatch
lda $AA76 ; check second character of filename
cmp #$C9 ; = I, filename = @INIT
bne +
ldx #$00 ; Patch it to return to TR
stx $0DB4 ; instead of exiting to BASIC
inx
stx $0DB5
inc $0C85 ; prevent language card detection
+ cmp #$C6 ; = F, filename = @FHR
bne ++
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
beq ++
ldx #$2C
stx $15AE ; don't decrement bullets
++ jmp ($AA72) ; finally jump to the loaded file
!if * > $1C0 {
!error "code is too large, ends at ", *
}