tape routines can now be placed in Mega65 extra ROM space

commit 2f27e29758da1f1ec965588c0712125051a6f71a
Merge: ba722b1 796b62f
Author: FeralChild64 <you@example.com>
Date:   Tue Jan 28 17:34:53 2020 +0100

    Merge branch 'master' into tape_redirect

commit ba722b17e627af7dd067932688de0a3d86423e37
Author: FeralChild64 <you@example.com>
Date:   Tue Jan 28 17:28:19 2020 +0100

    finished Mega65 variant of tape routines

commit 47de685f2e08576504c5e00a5b7cb78498d22e72
Author: FeralChild64 <you@example.com>
Date:   Mon Jan 27 23:06:45 2020 +0100

    compilation fix

commit c3641acec049a7a6b53c35795b1f9e2df212cec2
Author: FeralChild64 <you@example.com>
Date:   Mon Jan 27 22:53:30 2020 +0100

    dependencies fix

commit dfad7a30bde043fa077005624dde1de4b72573b6
Merge: e4b0ec9 e410bc0
Author: FeralChild64 <you@example.com>
Date:   Mon Jan 27 21:25:49 2020 +0100

    Merge branch 'master' into tape_redirect

commit e4b0ec9c85861bde2ce52e0828d3bf895a681e17
Author: FeralChild64 <you@example.com>
Date:   Sat Jan 25 22:25:20 2020 +0100

    initial attempt to move tape code to Mega65 extra ROM
This commit is contained in:
FeralChild64 committed 2020-01-28 17:35:42 +01:00
1 parent 796b62f166
commit d489e7bf41
36 files changed
+275 -44

No files matched your search

+1 -1
View File
@@ -116,7 +116,7 @@
// Screen editor
#define CONFIG_EDIT_STOPQUOTE
#define CONFIG_EDIT_TABULATORS
// #define CONFIG_EDIT_TABULATORS
// Software features
+1 -1
View File
@@ -107,7 +107,7 @@
// Screen editor
#define CONFIG_EDIT_STOPQUOTE
#define CONFIG_EDIT_TABULATORS
// #define CONFIG_EDIT_TABULATORS
// Software features
+3 -3
View File
@@ -48,9 +48,9 @@
#define CONFIG_IEC_JIFFYDOS
#define CONFIG_IEC_JIFFYDOS_BLANK
// #define CONFIG_TAPE_NORMAL
// #define CONFIG_TAPE_TURBO
// #define CONFIG_TAPE_AUTODETECT
#define CONFIG_TAPE_NORMAL
#define CONFIG_TAPE_TURBO
#define CONFIG_TAPE_AUTODETECT
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
// #define CONFIG_TAPE_NO_ERROR_CORRECTION
+1 -1
View File
@@ -107,7 +107,7 @@
// Screen editor
#define CONFIG_EDIT_STOPQUOTE
#define CONFIG_EDIT_TABULATORS
// #define CONFIG_EDIT_TABULATORS
// Software features
+13 -7
View File
@@ -291,18 +291,24 @@
//
// Definitions foor tape functionality
// Definitions for tape functionality
//
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
.label __normal_time_S = IRQTMP+0 // duration of the short pulse
.label __normal_time_M = IRQTMP+1 // duration of the medium pulse
.label __normal_time_S = IRQTMP+0 // duration of the short pulse
.label __normal_time_M = IRQTMP+1 // duration of the medium pulse
.label __turbo_half_S = IRQTMP+0 // half-duration of the short pulse
.label __turbo_half_L = IRQTMP+1 // half-duration of the long pulse
.label __turbo_half_S = IRQTMP+0 // half-duration of the short pulse
.label __turbo_half_L = IRQTMP+1 // half-duration of the long pulse
.label __pulse_threshold = SVXT // pulse classification threshold
.label __pulse_threshold_ML = SYNO // M/L pulse classification threshold, for normal only
.label __pulse_threshold = SVXT // pulse classification threshold
.label __pulse_threshold_ML = SYNO // M/L pulse classification threshold, for normal only
#endif
#if CONFIG_TAPE_TURBO
.label __tape_turbo_bytestore = STACK // location of byte storage helper routine
#endif
+4
View File
@@ -8,6 +8,8 @@
basic_cold_start:
// #if !ROM_LAYOUT_M65
// Before doing anything, check if we have a compatible BASIC/KERNAL pair
ldy #(__rom_revision_basic_end - rom_revision_basic - 1)
@@ -22,6 +24,8 @@ basic_cold_start:
dey
bpl !--
// #endif
// Remaining part would not fit here
jmp basic_cold_start_internal
@@ -9,10 +9,12 @@
#if SEGMENT_KERNAL_0
// Labels for jumps
.label VK1__RAMTAS = $4000
// Label definitions
.label VK1__RAMTAS = $4000 + 2 * 0
.label VK1__load_tape_normal = $4000 + 2 * 1
.label VK1__load_tape_turbo = $4000 + 2 * 2
.label VK1__load_tape_auto = $4000 + 2 * 3
#else
@@ -20,5 +22,23 @@
.word RAMTAS
#if CONFIG_TAPE_NORMAL && !CONFIG_TAPE_AUTODETECT
.word load_tape_normal
#else
.word $0000
#endif
#if CONFIG_TAPE_TURBO && !CONFIG_TAPE_AUTODETECT
.word load_tape_turbo
#else
.word $0000
#endif
#if CONFIG_TAPE_AUTODETECT
.word load_tape_auto
#else
.word $0000
#endif
#endif
+55
View File
@@ -0,0 +1,55 @@
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
// Definitions for calling Mega65 segment KERNAL_0 routines from KERNAL_1
//
#import "KERNAL_0_combined.sym"
.label STOP = KERNAL_0.STOP
.label udtim_keyboard = KERNAL_0.udtim_keyboard
.label wait_x_bars = KERNAL_0.wait_x_bars
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
.label screen_on = KERNAL_0.screen_on
.label screen_off = KERNAL_0.screen_off
.label tape_motor_on = KERNAL_0.tape_motor_on
.label tape_motor_off = KERNAL_0.tape_motor_off
.label lvs_display_loading_verifying = KERNAL_0.proxy_K1_lvs_display_loading_verifying
.label lvs_display_done = KERNAL_0.proxy_K1_lvs_display_done
.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 lvs_check_EAL = KERNAL_0.lvs_check_EAL
.label lvs_STAL_to_MEMUSS = KERNAL_0.lvs_STAL_to_MEMUSS
.label kernalerror_ROUTINE_TERMINATED = KERNAL_0.proxy_K1_kernalerror_ROUTINE_TERMINATED
.label print_kernal_message = KERNAL_0.proxy_K1_print_kernal_message
.label print_return = KERNAL_0.proxy_K1_print_return
.label __MSG_KERNAL_PRESS_PLAY = KERNAL_0.__MSG_KERNAL_PRESS_PLAY
.label __MSG_KERNAL_FOUND = KERNAL_0.__MSG_KERNAL_FOUND
#endif
#if CONFIG_TAPE_NORMAL
.label tape_normal_byte_store = KERNAL_0.tape_normal_byte_store
#endif
#if CONFIG_TAPE_TURBO
.label tape_turbo_byte_store = KERNAL_0.tape_turbo_byte_store
#endif
+59
View File
@@ -0,0 +1,59 @@
// #LAYOUT# M65 KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Proxies for calling Mega65 segment KERNAL_0 routines from KERNAL_1
//
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
proxy_K1_kernalerror_ROUTINE_TERMINATED:
jsr map_NORMAL
jmp kernalerror_ROUTINE_TERMINATED
proxy_K1_lvs_display_loading_verifying:
jsr map_NORMAL
jsr lvs_display_loading_verifying
jmp map_KERNAL_1
proxy_K1_lvs_display_done:
jsr map_NORMAL
jsr lvs_display_done
jmp map_KERNAL_1
proxy_K1_lvs_return_last_address:
jsr map_NORMAL
jmp lvs_return_last_address
proxy_K1_lvs_device_not_found_error:
jsr map_NORMAL
jmp lvs_device_not_found_error
proxy_K1_lvs_load_verify_error:
jsr map_NORMAL
jmp lvs_load_verify_error
proxy_K1_print_kernal_message:
jsr map_NORMAL
jsr print_kernal_message
jmp map_KERNAL_1
proxy_K1_print_return:
jsr map_NORMAL
jsr print_return
jmp map_KERNAL_1
#endif
@@ -0,0 +1,39 @@
// #LAYOUT# M65 KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// ROM routine call redirect for tape loading
//
#if CONFIG_TAPE_NORMAL && !CONFIG_TAPE_AUTODETECT
load_tape_normal:
jsr map_KERNAL_1
jsr_ind VK1__load_tape_normal
jmp map_NORMAL
#endif
#if CONFIG_TAPE_TURBO && !CONFIG_TAPE_AUTODETECT
load_tape_turbo:
jsr map_KERNAL_1
jsr_ind VK1__load_tape_turbo
jmp map_NORMAL
#endif
#if CONFIG_TAPE_AUTODETECT
load_tape_auto:
jsr map_KERNAL_1
jsr_ind VK1__load_tape_auto
jmp map_NORMAL
#endif
+3 -4
View File
@@ -1,4 +1,6 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Official Kernal routine, described in:
@@ -24,6 +26,3 @@ membot_set:
stx MEMSTR+0
rts
#endif // ROM layout
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+5 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
@@ -128,7 +128,11 @@ load_tape_turbo_payload:
load_tape_turbo_loop:
jsr tape_turbo_get_byte
#if ROM_LAYOUT_M65
jsr tape_turbo_byte_store
#else
jsr __tape_turbo_bytestore // like 'sta (MEMUSS),y' - but under I/O
#endif
eor PRTY // handle checksum
sta PRTY
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
@@ -0,0 +1,19 @@
// #LAYOUT# M65 KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Tape (normal) helper routine - byte storage when ban changing is needed
//
#if CONFIG_TAPE_NORMAL
tape_normal_byte_store:
jsr map_NORMAL
sta (MEMUSS), y
jmp map_KERNAL_1
#endif
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+5 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
@@ -86,7 +86,11 @@ tape_normal_get_data_1_loop_byte_OK:
// Store byte, calculate checksum
lda INBIT
ldy #$00
#if ROM_LAYOUT_M65
jsr tape_normal_byte_store
#else
sta (MEMUSS), y
#endif
jsr tape_normal_update_checksum
// FALLTROUGH
+5 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
@@ -61,7 +61,11 @@ tape_normal_get_data_2_loop_from_log:
lda INBIT
ldy #$00
#if ROM_LAYOUT_M65
jsr tape_normal_byte_store
#else
sta (MEMUSS), y
#endif
!:
jsr tape_normal_update_checksum
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
@@ -0,0 +1,19 @@
// #LAYOUT# M65 KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Tape (turbo) helper routine - byte storage when ban changing is needed
//
#if CONFIG_TAPE_TURBO
tape_turbo_byte_store:
jsr map_NORMAL
jsr __tape_turbo_bytestore // like 'sta (MEMUSS),y' - but under I/O
jmp map_KERNAL_1
#endif
+1 -2
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
@@ -16,7 +16,6 @@
#if CONFIG_TAPE_TURBO
.label __tape_turbo_bytestore = STACK
.label __tape_turbo_bytestore_defmap = __tape_turbo_bytestore + 7
.label __tape_turbo_bytestore_size = __tape_turbo_bytestore_source_end - tape_turbo_bytestore_source
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//
+1 -1
View File
@@ -1,5 +1,5 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
//