mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-27 08:50:01 +00:00
fix Pegasus II reset vector
This commit is contained in:
parent
b4c2de8e4e
commit
49fafc4688
Binary file not shown.
72
src/prelaunch/lethal.kbd.a
Normal file
72
src/prelaunch/lethal.kbd.a
Normal file
@ -0,0 +1,72 @@
|
||||
;license:MIT
|
||||
;(c) 2024 by qkumba
|
||||
|
||||
!cpu 6502
|
||||
!to "build/PRELAUNCH/LETHAL.KBD",plain
|
||||
*=$300
|
||||
|
||||
!source "src/constants.a" ; no code in these
|
||||
!source "src/macros.a"
|
||||
|
||||
lda #$60
|
||||
sta $9EA
|
||||
jsr $800 ; find and load "DOS"
|
||||
lda #<callback1
|
||||
sta $B748
|
||||
lda #>callback1
|
||||
sta $B749
|
||||
jmp $B700
|
||||
|
||||
callback1
|
||||
lda #$10
|
||||
sta $9E52
|
||||
lda #1
|
||||
sta $9E53
|
||||
|
||||
lda #<callback2
|
||||
sta $BD07
|
||||
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 #<callback3
|
||||
sta $38
|
||||
lda #<callback3
|
||||
sta $39
|
||||
+ clc
|
||||
rts
|
||||
|
||||
callback3
|
||||
lda #$81
|
||||
sta $38
|
||||
lda #$9E
|
||||
sta $39
|
||||
+READ_RAM2_NO_WRITE
|
||||
bit MachineStatus
|
||||
+READ_ROM_NO_WRITE
|
||||
lda #'E'
|
||||
bvs +
|
||||
lda #'+'
|
||||
+ rts
|
@ -7,50 +7,16 @@
|
||||
|
||||
!source "src/prelaunch/common.a"
|
||||
|
||||
+ENABLE_ACCEL
|
||||
+NEW_RESET_VECTOR $110
|
||||
lda #$60
|
||||
sta $9EA
|
||||
jsr $800 ; find and load "DOS"
|
||||
lda #<callback1
|
||||
sta $B748
|
||||
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 $BD07
|
||||
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 ", *
|
||||
|
Loading…
Reference in New Issue
Block a user