autoswitch to legacy mode if loading file below $0800

This commit is contained in:
FeralChild64 committed 2020-09-03 19:42:10 +02:00
1 parent 4dcda28147
commit cdb5c1eef6
5 files changed
+68

No files matched your search

+1
View File
@@ -69,6 +69,7 @@
.label lvs_return_last_address = KERNAL_0.proxy_K1_lvs_return_last_address
.label lvs_device_not_found_error = KERNAL_0.proxy_K1_lvs_device_not_found_error
.label lvs_load_verify_error = KERNAL_0.proxy_K1_lvs_load_verify_error
.label m65_load_autoswitch_tape = KERNAL_0.proxy_K1_m65_load_autoswitch_tape
.label lvs_check_EAL = KERNAL_0.lvs_check_EAL
.label lvs_STAL_to_MEMUSS = KERNAL_0.lvs_STAL_to_MEMUSS
@@ -0,0 +1,44 @@
// #LAYOUT# M65 KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Automatic switching to legacy C64 mode if loading anything below $0800
//
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
m65_load_autoswitch_tape:
lda VERCKK
bne m65_load_autoswitch_done // no autoswitch for VERIFY
lda STAL+1
#endif
m65_load_autoswitch:
lda VERCKK
bne m65_load_autoswitch_done // no autoswitch for VERIFY
lda EAL+1
// FALLTROUGH
m65_load_autoswitch_check:
cmp #$08
bcs m65_load_autoswitch_done // no autoswitch if loading above $07FF
jsr M65_MODEGET
bcs m65_load_autoswitch_done // no autoswitch if already in legacy mode
sec
jmp M65_MODESET
// XXX consider displaying something here
m65_load_autoswitch_done:
rts
+6
View File
@@ -53,6 +53,12 @@ proxy_K1_lvs_load_verify_error:
jsr map_NORMAL
jmp lvs_load_verify_error
proxy_K1_m65_load_autoswitch_tape:
jsr map_NORMAL
jsr m65_load_autoswitch_tape
jmp_8 !-
proxy_K1_print_kernal_message:
jsr map_NORMAL
+9
View File
@@ -95,7 +95,16 @@ load_iec:
lda STAL+1
sta EAL+1
!:
#if ROM_LAYOUT_M65
// Switch to legacy mode if needed
jsr m65_load_autoswitch
#endif
// Display start address
jsr lvs_display_loading_verifying
#if (CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS) && !CONFIG_MEMORY_MODEL_60K
+8
View File
@@ -223,6 +223,14 @@ tape_handle_header:
jsr lvs_STAL_to_MEMUSS
#if ROM_LAYOUT_M65
// Switch to legacy mode if needed
jsr m65_load_autoswitch_tape
#endif
// Print LOADING and start address
jsr lvs_display_loading_verifying