From 49fafc46886234d9823d9592669617fc0ae512ff Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Fri, 17 May 2024 11:29:17 -0700 Subject: [PATCH] fix Pegasus II reset vector --- res/dsk/pegasus ii PRODOS (san inc pack).po | Bin 819200 -> 819200 bytes src/prelaunch/lethal.kbd.a | 72 ++++++++++++++++++++ src/prelaunch/lethal.labyrnth.a | 50 +++----------- 3 files changed, 80 insertions(+), 42 deletions(-) create mode 100644 src/prelaunch/lethal.kbd.a diff --git a/res/dsk/pegasus ii PRODOS (san inc pack).po b/res/dsk/pegasus ii PRODOS (san inc pack).po index 354ae844631a42c51fc34afbca50a9e83d6a1fb9..d9a9027c15c4b6ce3c1f1aa5b37b3bf8f6cadbc7 100644 GIT binary patch delta 61 zcmZo@FlqpzEsWn9nHdcallback1 + sta $B749 + jmp $B700 + +callback1 + lda #$10 + sta $9E52 + lda #1 + sta $9E53 + + lda #callback2 + sta $BD08 + + +DISABLE_ACCEL + jmp $9D84 + +callback2 + pla + pla + jsr $BD58 + jsr $BD09 + lda $B7EC + cmp #6 + bne ++ + cmp $B7ED + bne + + +GET_MACHINE_STATUS + and #CHEATS_ENABLED + beq + + dec $9643 ; patch - don't decrease lives + dec $967B ; patch - don't increase lives ++ clc + rts + +++ cmp #3 + bne + + lda #callback1 - sta $B749 - jmp $B700 - -callback1 - ldx #$00 - stx $9E52 - inx - stx $9E53 - - +READ_RAM2_NO_WRITE - lda MachineStatus - and #CHEATS_ENABLED - beq + - lda #callback2 - sta $BD08 -+ - jsr DisableAccelerator + +READ_RAM2_WRITE_RAM2 + jsr EnableAccelerator + +LOAD_FILE_AT lethal_kbd, $300 +READ_ROM_NO_WRITE - jmp $9D84 + +NEW_RESET_VECTOR $110 + jmp $300 -callback2 - pla - pla - jsr $BD58 - jsr $BD09 - lda #6 - cmp $B7EC - bne + - cmp $B7ED - bne + - dec $9643 ; patch - don't decrease lives - dec $967B ; patch - don't increase lives -+ clc - rts +lethal_kbd + !byte 20 + !text "PRELAUNCH/LETHAL.KBD" !if * > $1C0 { !error "code is too large, ends at ", *