reading second copy works now

This commit is contained in:
FeralChild64 committed 2020-01-27 19:55:13 +01:00
1 parent 32a37e9e6f
commit ade6cecbb3
10 files changed
+51 -23

No files matched your search

+7 -6
View File
@@ -50,18 +50,19 @@
#define CONFIG_IEC_DOLPHINDOS_FAST
#define CONFIG_IEC_JIFFYDOS
#define CONFIG_IEC_JIFFYDOS_BLANK
// #define CONFIG_IEC_BURST_CIA1 // please keep disabled for now
// #define CONFIG_IEC_BURST_CIA2 // please keep disabled for now
// #define CONFIG_IEC_BURST_SOFT // please keep disabled for now
// #define CONFIG_IEC_BURST_CIA1 // please keep disabled for now
// #define CONFIG_IEC_BURST_CIA2 // please keep disabled for now
// #define CONFIG_IEC_BURST_SOFT // please keep disabled for now
#define CONFIG_TAPE_NORMAL
#define CONFIG_TAPE_TURBO
#define CONFIG_TAPE_AUTODETECT // mostly works, but not fully done yet!
#define CONFIG_TAPE_AUTODETECT // mostly works, but not fully done yet!
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
// #define CONFIG_TAPE_NO_ERROR_CORRECTION
// #define CONFIG_RS232_UP2400 // please keep disabled for now
// #define CONFIG_RS232_UP9600 // please keep disabled for now
// #define CONFIG_RS232_UP2400 // please keep disabled for now
// #define CONFIG_RS232_UP9600 // please keep disabled for now
// Multiple SID support
+2 -1
View File
@@ -48,10 +48,11 @@
#define CONFIG_IEC_JIFFYDOS
#define CONFIG_IEC_JIFFYDOS_BLANK
// #define CONFIG_TAPE_NORMAL
#define CONFIG_TAPE_NORMAL
#define CONFIG_TAPE_TURBO
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
#define CONFIG_TAPE_NO_ERROR_CORRECTION
// Multiple SID support
+1
View File
@@ -52,6 +52,7 @@
// #define CONFIG_TAPE_TURBO
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
#define CONFIG_TAPE_NO_ERROR_CORRECTION
// Multiple SID support
+1
View File
@@ -52,6 +52,7 @@
#define CONFIG_TAPE_TURBO
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
#define CONFIG_TAPE_NO_ERROR_CORRECTION
// Multiple SID support
+1
View File
@@ -52,6 +52,7 @@
#define CONFIG_TAPE_TURBO
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
#define CONFIG_TAPE_NO_ERROR_CORRECTION
// Multiple SID support
+11 -1
View File
@@ -21,8 +21,10 @@ tape_normal_get_data_1:
// and pointers for error log and correction mechanism
lda #$00
sta RIPRTY
#if !CONFIG_TAPE_NO_ERROR_CORRECTION
sta PTR1
sta PTR2
#endif
// FALLTROUGH
@@ -43,6 +45,12 @@ tape_normal_get_data_1_loop:
jsr tape_normal_get_byte
bcc tape_normal_get_data_1_loop_byte_OK
#if CONFIG_TAPE_NO_ERROR_CORRECTION
bcs tape_normal_get_data_1_fail
#else
// Problem reading a byte, try to add it to the error log
tsx
@@ -56,13 +64,15 @@ tape_normal_get_data_1_loop:
lda MEMUSS+1
sta STACK, x
inx
sta PTR1
stx PTR1
// Addres added to error log, check if this was a checksum
jsr tape_normal_get_marker
bcc tape_normal_get_data_1_loop_advance
bcs tape_normal_get_data_1_success
#endif
tape_normal_get_data_1_loop_byte_OK:
jsr tape_normal_get_marker
+19 -13
View File
@@ -9,20 +9,27 @@
#if CONFIG_TAPE_NORMAL
tape_normal_get_data_2:
#if CONFIG_TAPE_NO_ERROR_CORRECTION
tape_normal_get_data_2: // XXX implement under separate name
// Just validate the checksum
lda RIPRTY
cmp #$01
rts
#elif XXX_DISABLED
#else
tape_normal_get_data_2:
// First check if there is a need to read anything
// XXX lda PTR1
// XXX beq tape_normal_get_data_2_checksum
lda PTR1
beq tape_normal_get_data_2_log_checksum
// Read sync of the block
@@ -40,25 +47,21 @@ tape_normal_get_data_2_loop:
jsr tape_normal_get_byte
bcc tape_normal_get_data_2_loop_byte_OK
// Problem reading byte
// Problem reading a byte - just skip it
jsr load_cmp_log_MEMUSS
bne tape_normal_get_data_2_loop_advance
sec
rts
bcs tape_normal_get_data_2_loop_advance
tape_normal_get_data_2_loop_byte_OK:
jsr load_cmp_log_MEMUSS
beq tape_normal_get_data_2_loop_byte_correct // branch if byte from the log
beq tape_normal_get_data_2_loop_from_log // branch if byte from the log
jsr tape_normal_get_marker
bcs tape_normal_get_data_2_log_checksum // branch if end of blocks
bcc tape_normal_get_data_2_loop_advance
tape_normal_get_data_2_loop_byte_correct:
tape_normal_get_data_2_loop_from_log:
// This is a byte from the log
@@ -132,3 +135,6 @@ load_cmp_log_MEMUSS:
#endif
#endif