CBDOS now works in compatibility mode too

This commit is contained in:
FeralChild64 committed 2021-02-24 19:08:51 +01:00
1 parent cb16d5d15c
commit b21ba971f9
4 files changed
+40 -18

No files matched your search

+9 -5
View File
@@ -5,6 +5,10 @@
dos_ENTER: ; enter DOS context
php
jsr m65_speed_tape_cbdos
plp
sta REG_A
stx REG_X
sty REG_Y
@@ -26,12 +30,8 @@ dos_EXIT: ; exit DOS context with Carry clear
dos_EXIT_common:
ldz REG_Z
ldy REG_Y
ldx REG_X
lda REG_A
rts
bra dos_EXIT_A_common
dos_EXIT_A_SEC: ; exit DOS context with Carry set, return .A
@@ -51,4 +51,8 @@ dos_EXIT_A_common:
ldy REG_Y
ldx REG_X
php
jsr m65_speed_restore
plp
rts
+2
View File
@@ -10,3 +10,5 @@
;; #ALIAS# kernalstatus_EOI = KERNAL_0.kernalstatus_EOI
;; #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
View File
@@ -10,7 +10,12 @@
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'
@@ -60,6 +65,12 @@ dos_INIT:
sta code_RTS_03
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
+15 -10
View File
@@ -30,13 +30,7 @@ m65_speed_iec:
; Disable badlines and slow interrupt emulation
lda #$00
sta MISC_EMU
; Return
pla
rts
bra m65_speed_tape_cbdos_ME
}
@@ -49,11 +43,22 @@ m65_speed_tape_cbdos:
bcc @1
jsr viciv_unhide
@1:
; Just set the maximum possible speed
; Set the maximum possible speed
pha
bra m65_speed_restore_native
lda #%01000000
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: