add some cheats

This commit is contained in:
Peter Ferrie 2022-05-06 14:58:09 -07:00
parent 8e6f33b951
commit be14969976
13 changed files with 116 additions and 126 deletions

View File

@ -39,8 +39,8 @@
1001,APPLE.INVADER=Apple Invader
0001,APPLE.PANIC=Apple Panic
1001,AO=Apple-Oids
0001,AQUATRON=Aquatron
1000,AB=Arcade Boot Camp
0006,AQUATRON=Aquatron
1006,AB=Arcade Boot Camp
1000,ARCHON=Archon
0000,ARCHON.II=Archon II
1000,ARCTIC.FOX=Arctic Fox
@ -84,8 +84,8 @@
0001,BB=Brainteaser Boulevard
1011,BRUCE.LEE=Bruce Lee
1001,BUBBLE.BOBBLE=Bubble Bobble
0001,BR=Buck Rogers: Planet of Zoom
0001,BUG.ATTACK=Bug Attack
0006,BR=Buck Rogers: Planet of Zoom
0006,BUG.ATTACK=Bug Attack
0001,BUG.BATTLE=Bug Battle
0003,BU=BurgerTime
0001,BUZZARD.BAIT=Buzzard Bait
@ -97,14 +97,14 @@
0001,CAPTAIN.POWER=Captain Power
0002,CS=Castle Smurfenstein
0002,CW=Castle Wolfenstein
0000,CAVRN.CREATURES=Cavern Creatures
0001,CAVRN.CREATURES=Cavern Creatures
1001,CC=Caverns of Callisto
1001,CEILING.ZERO=Ceiling Zero
1001,CENTIPEDE=Centipede
0001,CL=Championship Lode Runner
1001,CHIP.OUT=Chip Out
0000,CHIVALRY=Chivalry
1000,CHOPLIFTER=Choplifter
1006,CHOPLIFTER=Choplifter
0010,COLUMNS=Columns
0101,COMMANDO=Commando
0003,CONAN=Conan
@ -192,7 +192,7 @@
1003,H.E.R.O=H E R O
0000,HADRON=Hadron
0000,HANDY.DANDY=Handy Dandy
0001,HARD.HAT.MACK=Hard Hat Mack
0006,HARD.HAT.MACK=Hard Hat Mack
0000,HEAD.ON=Head On
1110,HEAVY.BARREL=Heavy Barrel
0000,HIGH.RISE=High Rise
@ -231,7 +231,7 @@
0000,LL=Lethal Labyrinth
0000,LP=Little Computer People
0001,LC=Lock 'n' Chase
0001,LODE.RUNNER=Lode Runner
0006,LODE.RUNNER=Lode Runner
1000,LOST.TOMB=Lost Tomb
0000,LUNAR.LEEPERS=Lunar Leepers
0000,M.I.R.V=M I R V
@ -249,7 +249,7 @@
0000,MEGABOTS=Megabots
1001,MICRO.INVADERS=Micro Invaders
0001,MICROWAVE=Microwave
1001,MINER.2049ER=Miner 2049er
1006,MINER.2049ER=Miner 2049er
1001,MINER.II=Miner II
1001,MI=Ming's Challenge
0001,MINIT.MAN=Minit Man
@ -276,7 +276,7 @@
0001,OID.ZONE=Oid Zone
1001,OI=Oil's Well
1000,ON.THE.RUN=On The Run
0000,ORBITRON=Orbitron
0006,ORBITRON=Orbitron
0000,OW=Out of This World
0000,OUTPOST=Outpost
0000,OUTWORLD=Outworld
@ -325,7 +325,7 @@
0000,RIBBIT=Ribbit
1000,ROACH.HOTEL=Roach Hotel
0000,ROADBLOCK=Roadblock
0110,ROBOCOP=Robocop
0116,ROBOCOP=Robocop
0000,ROBOT.BATTLE=Robot Battle
0000,ROBOTRON.2084=Robotron 2084
0001,ROUND.ABOUT=Round About
@ -336,7 +336,7 @@
0001,SARACEN=Saracen
0006,SEA.DRAGON=Sea Dragon
0000,SEAFOX=Seafox
0001,SERPENTINE=Serpentine
0006,SERPENTINE=Serpentine
1000,SHAMUS=Shamus
0000,SHEILA=Sheila
0000,SHORT.CIRCUIT=Short Circuit
@ -402,7 +402,7 @@
0110,TS=The Chase on Tom S's Island
1000,THE.DAM.BUSTERS=The Dam Busters
1000,THE.GOONIES=The Goonies
0001,THE.HEIST=The Heist
0006,THE.HEIST=The Heist
1000,LG=The Last Gladiator
1111,THE.LAST.NINJA=The Last Ninja
1100,MM=The Movie Monster Game
@ -425,7 +425,7 @@
1000,TROLLS.TRIBS=Trolls and Tribulations
0001,TROMPERS=Trompers
1000,TSUNAMI=Tsunami
1001,TB=Tubeway ][
1006,TB=Tubeway ][
0000,TUNNEL.TERROR=Tunnel Terror
0001,TWERPS=Twerps
1001,UD=Up'n Down

View File

@ -0,0 +1,6 @@
# This file is maintained by hand
BERZAP.MB=Type(06),AuxType(0200),Access(C3)
CAVRN.CHEAT=Type(06),AuxType(0200),Access(C3)
KAMUNGAS.MB=Type(06),AuxType(0200),Access(C3)
RESQ.RAIDERS.MB=Type(06),AuxType(0300),Access(C3)

View File

@ -11,14 +11,6 @@
lda #$60
sta $4083
jsr $4000 ; decompress
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
beq +
lda #$a5
sta $7ff ; patch - don't increase lives
sta $803 ; patch - don't decrease lives
sta $998 ; patch - don't decrease lives
+
lda $7fe ; Buck Rogers code
pha
+DISABLE_ACCEL

View File

@ -15,15 +15,6 @@
jmp $6400 ; decompress
callback
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
beq +
lda #$a5
sta $F8D ; patch - don't decrease lives
sta $41B9 ; patch - don't increase lives
sta $42F1 ; patch - don't increase lives
sta $4434 ; patch - don't increase lives
+
+DISABLE_ACCEL
jmp $4D36

View File

@ -0,0 +1,85 @@
;license:MIT
;(c) 2022 by qkumba
!cpu 6502
!to "build/PRELAUNCH/CAVRN.CHEAT",plain
*=$200
!source "src/constants.a" ; no code in these
!source "src/macros.a"
ldy #0
- lda callback, y
sta $110, y
iny
bne -
jmp $110
callback !pseudopc $110 {
callback1
+ENABLE_ACCEL
lda #$4C
sta $8F9
lda #<callback2
sta $8FA
lda #>callback2
sta $8FB
jmp $800 ; decompress
callback2
lda #<callback1
sta $BE13
lda #>callback1
sta $BE14
ldx #$60
lda $D49
cmp #'0'
beq patch0
cmp #'1'
beq patch1
cmp #'2'
beq patch2
stx $83BB
jsr $6000 ; decompress
jsr noaccel
beq +
dec $B14 ; patch - don't decrease lives
dec $D5E ; patch - don't increase lives
+
jmp $800
patch0
stx $1812
jsr $1800 ; decompress
jsr noaccel
jmp $1C00
patch1
stx $2023
jsr $2000 ; decompress
jsr noaccel
beq +
dec $4F43 ; patch - don't decrease lives
dec $5548 ; patch - don't increase lives
+
jmp $4A00
patch2
stx $2039
jsr $2000 ; decompress
jsr noaccel
beq +
dec $1239 ; patch - don't decrease lives
dec $1608 ; patch - don't increase lives
+
jmp $1A4E
noaccel
+READ_RAM2_NO_WRITE
jsr DisableAccelerator
lda MachineStatus
and #CHEATS_ENABLED
+READ_ROM_NO_WRITE
rts
}

View File

@ -7,56 +7,17 @@
!source "src/prelaunch/common.a"
callback1
+ENABLE_ACCEL
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_AT cavrn_cheat, 0
+READ_ROM_NO_WRITE
jmp $200
lda #$4C
sta $8F9
lda #<callback2
sta $8FA
lda #>callback2
sta $8FB
jmp $800 ; decompress
callback2
lda #<callback1
sta $BE13
lda #>callback1
sta $BE14
ldx #$60
lda $D49
cmp #'0'
beq patch0
cmp #'1'
beq patch1
cmp #'2'
beq patch2
stx $83BB
jsr $6000 ; decompress
jsr noaccel
jmp $800
patch0
stx $1812
jsr $1800 ; decompress
jsr noaccel
jmp $1C00
patch1
stx $2023
jsr $2000 ; decompress
jsr noaccel
jmp $4A00
patch2
stx $2039
jsr $2000 ; decompress
jsr noaccel
jmp $1A4E
noaccel
+DISABLE_ACCEL
rts
cavrn_cheat
!byte cavrn_cheat_e-cavrn_cheat_b
cavrn_cheat_b
!text "PRELAUNCH/CAVRN.CHEAT"
cavrn_cheat_e
!if * > $1C0 {
!error "code is too large, ends at ", *

View File

@ -14,13 +14,6 @@
sta $942E
jsr $4856 ; decompress
patcher rts
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
beq +
lda #$AD
sta $50A5 ; patch - don't decrease lives
sta $7197 ; patch - don't increase lives
+
lda #1
sta $2218 ; reset vector patch

View File

@ -11,15 +11,6 @@
lda #$60
sta $1F4E
jsr $1F00 ; decompress
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
beq +
; lives in $98, capped at 255
lda #$FF
sta $606F ; start with 255 lives
lda #$A5
sta $613F ; patch - don't decrease lives
+
+DISABLE_ACCEL
jmp $9050

View File

@ -16,12 +16,6 @@
jmp $2000 ; decompress
callback
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
beq +
lda #$BD
sta $0964 ; patch - don't decrease lives
+
+DISABLE_ACCEL
jmp $0918

View File

@ -7,9 +7,6 @@
!source "src/prelaunch/common.a"
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
sta cheat
+NEW_RESET_VECTOR $3C0
ldx #$0E ; copy patch code to zero page (stack will be destroyed by the time we need to patch)
- lda patch,x
@ -23,13 +20,6 @@
jmp $43F5 ; decompress and show title
patch
jsr $00F0 ; decompress
cheat=*+1
lda #0 ; SMC
beq +
; lives in $D8 (capped at 3)
lda #$A5
sta $868F ; patch - don't decrease lives
+
jmp $0800
!if * > $1C0 {

View File

@ -15,11 +15,6 @@
jmp $4000 ; decompress
callback
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
beq +
dec $A47 ; patch - don't decrease lives
+
+DISABLE_ACCEL
jmp $A05

View File

@ -11,14 +11,6 @@
lda #$60
sta $6C30
jsr $4EC6 ; decompress
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
beq +
lda #$A5
sta $9083 ; patch - don't decrease lives
sta $A1FA ; patch - don't increase lives
sta $A735 ; patch - don't increase lives
+
+DISABLE_ACCEL
jmp $9000

View File

@ -36,7 +36,7 @@ rem create _FileInformation.txt files for subdirectories
rem
cscript /nologo bin\buildfileinfo.js res\ICONS "CA" "0000" >>build/log
cscript /nologo bin\buildfileinfo.js build\FX "06" "6000" >>build/log
cscript /nologo bin\buildfileinfo.js build\PRELAUNCH "06" "0106" >>build/log
1>nul copy /y src\prelaunch\_FileInformation.txt build\PRELAUNCH >>build/log
rem
rem add everything to the disk
rem