CBDOS now works in compatibility mode too
This commit is contained in:
1 parent
cb16d5d15c
commit
b21ba971f9
4 files changed
+40
-18
No files matched your search
@@ -5,6 +5,10 @@
|
|||||||
|
|
||||||
dos_ENTER: ; enter DOS context
|
dos_ENTER: ; enter DOS context
|
||||||
|
|
||||||
|
php
|
||||||
|
jsr m65_speed_tape_cbdos
|
||||||
|
plp
|
||||||
|
|
||||||
sta REG_A
|
sta REG_A
|
||||||
stx REG_X
|
stx REG_X
|
||||||
sty REG_Y
|
sty REG_Y
|
||||||
@@ -26,12 +30,8 @@ dos_EXIT: ; exit DOS context with Carry clear
|
|||||||
|
|
||||||
dos_EXIT_common:
|
dos_EXIT_common:
|
||||||
|
|
||||||
ldz REG_Z
|
|
||||||
ldy REG_Y
|
|
||||||
ldx REG_X
|
|
||||||
lda REG_A
|
lda REG_A
|
||||||
|
bra dos_EXIT_A_common
|
||||||
rts
|
|
||||||
|
|
||||||
|
|
||||||
dos_EXIT_A_SEC: ; exit DOS context with Carry set, return .A
|
dos_EXIT_A_SEC: ; exit DOS context with Carry set, return .A
|
||||||
@@ -51,4 +51,8 @@ dos_EXIT_A_common:
|
|||||||
ldy REG_Y
|
ldy REG_Y
|
||||||
ldx REG_X
|
ldx REG_X
|
||||||
|
|
||||||
|
php
|
||||||
|
jsr m65_speed_restore
|
||||||
|
plp
|
||||||
|
|
||||||
rts
|
rts
|
||||||
@@ -10,3 +10,5 @@
|
|||||||
;; #ALIAS# kernalstatus_EOI = KERNAL_0.kernalstatus_EOI
|
;; #ALIAS# kernalstatus_EOI = KERNAL_0.kernalstatus_EOI
|
||||||
;; #ALIAS# kernalstatus_DEVICE_NOT_FOUND = KERNAL_0.kernalstatus_DEVICE_NOT_FOUND
|
;; #ALIAS# kernalstatus_DEVICE_NOT_FOUND = KERNAL_0.kernalstatus_DEVICE_NOT_FOUND
|
||||||
|
|
||||||
|
;; #ALIAS# m65_speed_tape_cbdos = KERNAL_0.m65_speed_tape_cbdos
|
||||||
|
;; #ALIAS# m65_speed_restore = KERNAL_0.m65_speed_restore
|
||||||
+14
-3
@@ -10,7 +10,12 @@
|
|||||||
|
|
||||||
dos_INIT:
|
dos_INIT:
|
||||||
|
|
||||||
jsr dos_ENTER
|
; Safer version of 'dos_ENTER' - does not affect speed related registers
|
||||||
|
|
||||||
|
sta REG_A
|
||||||
|
stx REG_X
|
||||||
|
sty REG_Y
|
||||||
|
stz REG_Z
|
||||||
|
|
||||||
; Set the magic string 'CBDOS'
|
; Set the magic string 'CBDOS'
|
||||||
|
|
||||||
@@ -60,6 +65,12 @@ dos_INIT:
|
|||||||
sta code_RTS_03
|
sta code_RTS_03
|
||||||
sta code_RTS_04
|
sta code_RTS_04
|
||||||
|
|
||||||
; Exit DOS context
|
; Safer version of 'dos_EXIT' - does not affect speed related registers
|
||||||
|
|
||||||
jmp dos_EXIT
|
clc
|
||||||
|
ldz REG_Z
|
||||||
|
ldy REG_Y
|
||||||
|
ldx REG_X
|
||||||
|
lda REG_A
|
||||||
|
|
||||||
|
rts
|
||||||
@@ -30,13 +30,7 @@ m65_speed_iec:
|
|||||||
|
|
||||||
; Disable badlines and slow interrupt emulation
|
; Disable badlines and slow interrupt emulation
|
||||||
|
|
||||||
lda #$00
|
bra m65_speed_tape_cbdos_ME
|
||||||
sta MISC_EMU
|
|
||||||
|
|
||||||
; Return
|
|
||||||
|
|
||||||
pla
|
|
||||||
rts
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -49,11 +43,22 @@ m65_speed_tape_cbdos:
|
|||||||
bcc @1
|
bcc @1
|
||||||
jsr viciv_unhide
|
jsr viciv_unhide
|
||||||
@1:
|
@1:
|
||||||
; Just set the maximum possible speed
|
; Set the maximum possible speed
|
||||||
|
|
||||||
pha
|
lda #%01000000
|
||||||
bra m65_speed_restore_native
|
tsb VIC_CTRLB
|
||||||
|
|
||||||
|
; FALLTROUGH
|
||||||
|
|
||||||
|
m65_speed_tape_cbdos_ME:
|
||||||
|
|
||||||
|
; Disable badlines and slow interrupt emulation
|
||||||
|
|
||||||
|
lda #$00
|
||||||
|
sta MISC_EMU
|
||||||
|
|
||||||
|
pla
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
m65_speed_restore:
|
m65_speed_restore:
|
||||||
|
|||||||
Reference in new issue
Block a user