small tape support + turbo mode tweaks
This commit is contained in:
1 parent
c98407bd84
commit
6dc461d184
9 files changed
+84
-29
No files matched your search
@@ -0,0 +1,31 @@
|
||||
;; #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; Tape helper routine
|
||||
;
|
||||
; - unlocks VIC-IV
|
||||
; - switches CPU to fast processing mode and disables badlines
|
||||
; - stores previous VIC_CTRLB in NXTBIN
|
||||
;
|
||||
|
||||
!ifdef HAS_TAPE {
|
||||
|
||||
|
||||
tape_fast_cpu:
|
||||
|
||||
jsr M65_MODEGET
|
||||
bcc @1
|
||||
|
||||
jsr viciv_unhide
|
||||
@1:
|
||||
lda VIC_CTRLB
|
||||
ora #%01000000
|
||||
sta VIC_CTRLB
|
||||
sta NXTBIT
|
||||
|
||||
lda #$00
|
||||
sta MISC_EMU
|
||||
|
||||
rts
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
!ifdef CONFIG_MB_U64 {
|
||||
|
||||
U64_SLOW:
|
||||
|
||||
lda #$00 ; for U64_TURBOCTL - badlines, 1MHz
|
||||
|
||||
+skip_2_bytes_trash_nvz
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
U64_FAST:
|
||||
|
||||
lda #$0F ; for U64_TURBOCTL - badlines, 48MHz
|
||||
sta SCPU_SPEED_TURBO ; any value will do
|
||||
|
||||
rts
|
||||
}
|
||||
@@ -32,6 +32,12 @@ hw_entry_reset:
|
||||
jsr m65_reset_part
|
||||
}
|
||||
|
||||
!ifdef CONFIG_MB_U64 {
|
||||
|
||||
jsr U64_SLOW
|
||||
sta SCPU_SPEED_NORMAL
|
||||
}
|
||||
|
||||
!ifdef CONFIG_PLATFORM_COMMODORE_64 {
|
||||
|
||||
; The following routine is based on reading the public KERNAL jumptable routine
|
||||
|
||||
@@ -30,8 +30,7 @@ tape_screen_on_motor_off:
|
||||
lda #$03
|
||||
sta MISC_EMU
|
||||
|
||||
lda VIC_CTRLB
|
||||
and #%10111111
|
||||
lda NXTBIT
|
||||
sta VIC_CTRLB
|
||||
|
||||
sta VIC_KEY
|
||||
@@ -70,18 +69,7 @@ tape_screen_off_motor_on:
|
||||
; to be handled by 1 MHz CPU - so in case of compatibility mode, switch CPU to fast speed
|
||||
; (and disable badlines, so we will not have to blank the screen)
|
||||
|
||||
jsr M65_MODEGET
|
||||
bcc @2
|
||||
|
||||
jsr viciv_unhide
|
||||
|
||||
lda VIC_CTRLB
|
||||
ora #%01000000
|
||||
sta VIC_CTRLB
|
||||
|
||||
lda #$00
|
||||
sta MISC_EMU
|
||||
@2:
|
||||
jsr tape_fast_cpu
|
||||
|
||||
} else ifdef CONFIG_MB_U64 {
|
||||
|
||||
@@ -90,10 +78,8 @@ tape_screen_off_motor_on:
|
||||
cmp #$FF
|
||||
beq @2 ; branch if no turbo control available
|
||||
|
||||
lda #$8F ; max speed, no badlines
|
||||
sta U64_TURBOCTL
|
||||
jsr U64_FAST ; max speed, no badlines
|
||||
bne @3 ; branch always
|
||||
|
||||
@2:
|
||||
jsr screen_off
|
||||
@3:
|
||||
|
||||
@@ -45,6 +45,17 @@ tape_head_align:
|
||||
|
||||
jsr nmi_lock
|
||||
|
||||
; Switch CPU to fast mode
|
||||
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
jsr tape_fast_cpu
|
||||
}
|
||||
|
||||
!ifdef CONFIG_MB_U64 {
|
||||
jsr U64_FAST
|
||||
sta SCPU_SPEED_TURBO
|
||||
}
|
||||
|
||||
; Prepare CIA timers
|
||||
|
||||
ldx #$02 ; set timer A to 3 ticks
|
||||
|
||||
Reference in new issue
Block a user