From c42d434281bca9389eb68dd7a34b110659690b6e Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Tue, 26 May 2020 14:52:16 -0700 Subject: [PATCH] reset vector additions --- ...pharaoh's revenge PRODOS (san inc pack).po | Bin 819200 -> 819200 bytes src/macros.a | 3 +- src/prelaunch/bop.n.wrestle.a | 5 ++- src/prelaunch/hardball.a | 1 + src/prelaunch/last.gladiator.a | 31 ++++++++++++++++++ .../{pharoahs.revng.a => pharaohs.revng.a} | 5 ++- src/prelaunch/run.for.it.a | 11 +++++++ src/prelaunch/ski.crazed.a | 30 ++++++++++++++--- src/prelaunch/starglider.a | 19 +++++++++-- src/prelaunch/the.dam.busters.a | 2 +- src/prelaunch/world.karate.a | 14 +++++++- 11 files changed, 108 insertions(+), 13 deletions(-) create mode 100644 src/prelaunch/last.gladiator.a rename src/prelaunch/{pharoahs.revng.a => pharaohs.revng.a} (84%) diff --git a/res/dsk/pharaoh's revenge PRODOS (san inc pack).po b/res/dsk/pharaoh's revenge PRODOS (san inc pack).po index cbe0b26de579906e47f3dcd7d0229940bdcac3f9..d2382711abe206ef825297699570eb81f8a34463 100644 GIT binary patch delta 65 zcmZo@FluNp+EB;B $1C0 { diff --git a/src/prelaunch/hardball.a b/src/prelaunch/hardball.a index 0639793c0..a74aa8277 100644 --- a/src/prelaunch/hardball.a +++ b/src/prelaunch/hardball.a @@ -14,6 +14,7 @@ jsr DisableAccelerator jsr $A001 + +LC_REBOOT jmp $9FE9 !if * > $1C0 { diff --git a/src/prelaunch/last.gladiator.a b/src/prelaunch/last.gladiator.a new file mode 100644 index 000000000..a78386f58 --- /dev/null +++ b/src/prelaunch/last.gladiator.a @@ -0,0 +1,31 @@ +;license:MIT +;(c) 2020 by qkumba + +!cpu 6502 +!to "build/PRELAUNCH/LAST.GLADIATOR",plain +*=$106 + + !source "src/prelaunch/common.a" + + +ENABLE_ACCEL + lda #$60 + sta $11EA + jsr $1000 ; decompress + + lda #$4C + sta $BC00 + lda #callback + sta $BC02 + + +DISABLE_ACCEL + jmp $11EF + +callback + +RESET_VECTOR $100 + rts + +!if * > $1C0 { + !error "code is too large, ends at ", * +} diff --git a/src/prelaunch/pharoahs.revng.a b/src/prelaunch/pharaohs.revng.a similarity index 84% rename from src/prelaunch/pharoahs.revng.a rename to src/prelaunch/pharaohs.revng.a index e25dcc5f2..3250999db 100644 --- a/src/prelaunch/pharoahs.revng.a +++ b/src/prelaunch/pharaohs.revng.a @@ -2,7 +2,7 @@ ;(c) 2020 by qkumba !cpu 6502 -!to "build/PRELAUNCH/PHAROAHS.REVNG",plain +!to "build/PRELAUNCH/PHARAOHS.REVNG",plain *=$106 !source "src/prelaunch/common.a" @@ -16,6 +16,7 @@ and #CHEATS_ENABLED php jsr DisableAccelerator + +LC_REBOOT lda #$60 sta $85F jsr $862 @@ -25,6 +26,8 @@ lda #$a5 sta $CF7 ; patch - don't decrease lives + + lda #1 + sta $AC6 jmp $A00 !if * > $1C0 { diff --git a/src/prelaunch/run.for.it.a b/src/prelaunch/run.for.it.a index 8cdd330b4..3d15396e3 100644 --- a/src/prelaunch/run.for.it.a +++ b/src/prelaunch/run.for.it.a @@ -26,6 +26,10 @@ lda #>callback sta $15C9 +DISABLE_ACCEL + lda #callback2 + sta $88F jmp $800 callback @@ -33,6 +37,13 @@ callback sta $A393 jmp $A19A +callback2 + ldx #0 + stx $A1C2 + inx + stx $A1C7 + jmp $A190 + !if * > $1C0 { !error "code is too large, ends at ", * } diff --git a/src/prelaunch/ski.crazed.a b/src/prelaunch/ski.crazed.a index 868c78923..b5e96f4fc 100644 --- a/src/prelaunch/ski.crazed.a +++ b/src/prelaunch/ski.crazed.a @@ -10,18 +10,40 @@ lda #$60 sta $A23 jsr $800 ; load "DOS" - lda #0 - sta $E084 - lsr $E08F lda #$82 sta $101 lda #$A6 sta $104 lda #$FA sta $105 ; update reset hook to reboot - inc $3F4 ; force reboot + lda #callback1 + sta $E0BE jmp $E03A +callback1 + ldy #$4C + sty $DA9D + ldy #callback2 + sty $DA9F + jmp $D000 + +callback2 + lda #$A2 + sta $DA9D + ldx #$FF + stx $DA9E + lda #$9A + sta $DA9F + inc $3F4 + inx + stx $A2C + lsr $A37 + jmp $A00 + !if * > $1C0 { !error "code is too large, ends at ", * } diff --git a/src/prelaunch/starglider.a b/src/prelaunch/starglider.a index bbb97cdfb..f6adae0b8 100644 --- a/src/prelaunch/starglider.a +++ b/src/prelaunch/starglider.a @@ -14,9 +14,22 @@ jsr DisableAccelerator jsr $B8C2 - +LC_REBOOT - inc $3F4 - jmp $B840 + + lda #$60 + sta $B859 + jsr $B840 + + ldx #0 + stx $7323 + inx + stx $732B + inc $101 + lda #$A6 + sta $104 + lda #$FA + sta $105 ; update reset hook to reboot + + jmp $800 !if * > $1C0 { !error "code is too large, ends at ", * diff --git a/src/prelaunch/the.dam.busters.a b/src/prelaunch/the.dam.busters.a index 10f09e3bc..cd1d8c023 100644 --- a/src/prelaunch/the.dam.busters.a +++ b/src/prelaunch/the.dam.busters.a @@ -12,9 +12,9 @@ sta $9B3 jsr $800 ; decompress - +LC_REBOOT jsr DisableAccelerator jsr $BE44 + +LC_REBOOT jmp $9B6 !if * > $1C0 { diff --git a/src/prelaunch/world.karate.a b/src/prelaunch/world.karate.a index 5f993dcbd..8f9fbf2e4 100644 --- a/src/prelaunch/world.karate.a +++ b/src/prelaunch/world.karate.a @@ -13,7 +13,19 @@ jsr $2000 ; decompress jsr DisableAccelerator jsr $B801 - jmp $21C1 + lda #$4C + sta $21C8 + jsr $21C1 + ldx #0 + stx $600D + inx + stx $6012 + inc $101 + lda #$A6 + sta $104 + lda #$FA + sta $105 ; update reset hook to reboot + jmp $21CB !if * > $1C0 { !error "code is too large, ends at ", *