diff --git a/CONFIG.md b/CONFIG.md index 9f0f7b30..b5a851c9 100644 --- a/CONFIG.md +++ b/CONFIG.md @@ -175,12 +175,6 @@ Enable this option if you are using a tape interface adapter with some audio sig Enable this option if you are using a tape interface adapter lacking tape motor control (most likely every adapter currently being sold) - this will eliminate the need to quickly press space when the program header information gets displayed. Note: if you are using a cassette player with REM port, and your adapter is connected to this port too, than you do not need this option. -### `CONFIG_TAPE_NO_ERROR_CORRECTION` - -Normal tape format contains two copies of each data block - in case some bytes from the first one are damaged, they can be corrected by reading them from the second copy. Enabling this option omits the core to read the second block. - -If used with `CONFIG_TAPE_NORMAL`, saves about 125 bytes in KERNAL segment. Not recommended when using real magnetic tapes. - ## Multiple SID support The SID is a sound chip - the original Commodore 64 had one installed. However, mods exists to add more of them for improved sound capabilities. Emulators and FPGA machines typically allow to simulate more than one too. Unfortunately, there is no standard regarding how these additional chips are visible in the processor address space, and there is no sane way to detect it - thus, it has to be configurable. diff --git a/src/,,config_custom.s b/src/,,config_custom.s index 5383a2ee..da8d626c 100644 --- a/src/,,config_custom.s +++ b/src/,,config_custom.s @@ -60,7 +60,6 @@ #define CONFIG_TAPE_AUTODETECT // #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 diff --git a/src/,,config_cx16.s b/src/,,config_cx16.s index 69d16602..a36527e9 100644 --- a/src/,,config_cx16.s +++ b/src/,,config_cx16.s @@ -56,7 +56,6 @@ // #define CONFIG_TAPE_AUTODETECT // #define CONFIG_TAPE_NO_KEY_SENSE // #define CONFIG_TAPE_NO_MOTOR_CONTROL -// #define CONFIG_TAPE_NO_ERROR_CORRECTION // Multiple SID support diff --git a/src/,,config_generic.s b/src/,,config_generic.s index a5bbe9bb..49ba908e 100644 --- a/src/,,config_generic.s +++ b/src/,,config_generic.s @@ -54,7 +54,6 @@ #define CONFIG_TAPE_AUTODETECT // #define CONFIG_TAPE_NO_KEY_SENSE // #define CONFIG_TAPE_NO_MOTOR_CONTROL -// #define CONFIG_TAPE_NO_ERROR_CORRECTION // Multiple SID support diff --git a/src/,,config_mega65.s b/src/,,config_mega65.s index 665650c5..7a742ee2 100644 --- a/src/,,config_mega65.s +++ b/src/,,config_mega65.s @@ -48,7 +48,6 @@ #define CONFIG_TAPE_AUTODETECT #define CONFIG_TAPE_NO_KEY_SENSE #define CONFIG_TAPE_NO_MOTOR_CONTROL -// #define CONFIG_TAPE_NO_ERROR_CORRECTION // Multiple SID support diff --git a/src/,,config_testing.s b/src/,,config_testing.s index ed450277..24010994 100644 --- a/src/,,config_testing.s +++ b/src/,,config_testing.s @@ -54,7 +54,6 @@ // #define CONFIG_TAPE_AUTODETECT // #define CONFIG_TAPE_NO_KEY_SENSE // #define CONFIG_TAPE_NO_MOTOR_CONTROL -#define CONFIG_TAPE_NO_ERROR_CORRECTION // Multiple SID support diff --git a/src/,,config_ultimate64.s b/src/,,config_ultimate64.s index 5e6eb4b0..b2373db5 100644 --- a/src/,,config_ultimate64.s +++ b/src/,,config_ultimate64.s @@ -54,7 +54,6 @@ #define CONFIG_TAPE_AUTODETECT // #define CONFIG_TAPE_NO_KEY_SENSE // #define CONFIG_TAPE_NO_MOTOR_CONTROL -// #define CONFIG_TAPE_NO_ERROR_CORRECTION // Multiple SID support diff --git a/src/kernal/tape/load_tape_normal.s b/src/kernal/tape/load_tape_normal.s index c1ecd776..3a38500b 100644 --- a/src/kernal/tape/load_tape_normal.s +++ b/src/kernal/tape/load_tape_normal.s @@ -80,13 +80,9 @@ load_tape_normal_switch_turbo: !: #endif -#if CONFIG_TAPE_NO_ERROR_CORRECTION - lda RIPRTY - cmp #$01 // sets Carry if checksum verification fails -#else jsr load_TAPE1_to_MEMUSS jsr tape_normal_get_data_2 -#endif + #if !CONFIG_TAPE_AUTODETECT bcs load_tape_normal_header // block load error, try again #else @@ -137,13 +133,9 @@ load_tape_normal_payload: jsr lvs_check_EAL bne_16 tape_load_error // amount of data read does not match header info -#if CONFIG_TAPE_NO_ERROR_CORRECTION - lda RIPRTY - cmp #$01 // sets Carry if checksum verification fails -#else jsr lvs_STAL_to_MEMUSS jsr tape_normal_get_data_2 -#endif + bcs_16 tape_load_error jmp tape_load_success diff --git a/src/kernal/tape/tape_normal_get_data_1.s b/src/kernal/tape/tape_normal_get_data_1.s index fd1242c6..04c7abae 100644 --- a/src/kernal/tape/tape_normal_get_data_1.s +++ b/src/kernal/tape/tape_normal_get_data_1.s @@ -21,10 +21,9 @@ tape_normal_get_data_1: // and pointers for error log and correction mechanism lda #$00 sta RIPRTY -#if !CONFIG_TAPE_NO_ERROR_CORRECTION + sta PTR2 sta PTR1 -#endif // FALLTROUGH @@ -44,12 +43,6 @@ 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 @@ -71,8 +64,6 @@ tape_normal_get_data_1_loop: 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 diff --git a/src/kernal/tape/tape_normal_get_data_2.s b/src/kernal/tape/tape_normal_get_data_2.s index cf2a3763..16b5f166 100644 --- a/src/kernal/tape/tape_normal_get_data_2.s +++ b/src/kernal/tape/tape_normal_get_data_2.s @@ -7,7 +7,7 @@ // -#if CONFIG_TAPE_NORMAL && !CONFIG_TAPE_NO_ERROR_CORRECTION +#if CONFIG_TAPE_NORMAL tape_normal_get_data_2: