completed tape format autodetection, updated binaries
This commit is contained in:
1 parent
94a0338ee7
commit
e410bc0900
18 files changed
+57
-25
No files matched your search
@@ -147,13 +147,19 @@ Causes screen blanking during JiffyDOS file loading to increase performance.
|
||||
|
||||
Adds a minimal normal (standard Commodore format) tape support - just LOAD command.
|
||||
|
||||
Needs about 850 bytes in KERNAL segment (if both normal and turbo are enabled, about 900 bytes are needed, as they share some code). If unsure - enable.
|
||||
Needs about 1050 bytes in KERNAL segment (if both normal and turbo are enabled, about 900 bytes are needed, as they share some code). If unsure - enable.
|
||||
|
||||
### `CONFIG_TAPE_TURBO`
|
||||
|
||||
Adds a minimal turbo tape support - just LOAD command (device 7, like on _Action Replay_ and _Final_ cartridges), up to 250 blocks
|
||||
|
||||
Needs about 700 bytes in KERNAL segment (if both normal and turbo are enabled, about 1050 bytes are needed, as they share some code). If unsure - enable.
|
||||
Needs about 700 bytes in KERNAL segment (if both normal and turbo are enabled, about 1300 bytes are needed, as they share some code). If unsure - enable.
|
||||
|
||||
### `CONFIG_TAPE_AUTODETECT`
|
||||
|
||||
Tape format (normal/turbo) is always autodetected.
|
||||
|
||||
Needs about 100 more bytes in KERNAL segment.
|
||||
|
||||
### `CONFIG_TAPE_NO_KEY_SENSE`
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ Here are the features of the Open ROMs not found in the original ROMs from the 8
|
||||
|
||||
* turbo tape load support (as device 7, or using `←L`), quite sophisticated: up to 250 blocks (can store bytes under I/O), automatically adjusts for tape speed differences
|
||||
* normal tape load error log is limited by free stack space only (no artificial limitation like in original ROMs)
|
||||
* tape format autodetection; normal vs turbo is mostly transparent to user
|
||||
* improved support for tape adapters (for using regular casette players and other audio devices instead of Datasette) and emulators
|
||||
|
||||
* extended `LOAD` command
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -56,7 +56,7 @@
|
||||
|
||||
#define CONFIG_TAPE_NORMAL
|
||||
#define CONFIG_TAPE_TURBO
|
||||
#define CONFIG_TAPE_AUTODETECT // mostly works, but not fully done yet!
|
||||
#define CONFIG_TAPE_AUTODETECT
|
||||
// #define CONFIG_TAPE_NO_KEY_SENSE
|
||||
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
|
||||
// #define CONFIG_TAPE_NO_ERROR_CORRECTION
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
#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
|
||||
@@ -70,8 +71,8 @@
|
||||
// Keyboard settings
|
||||
|
||||
// #define CONFIG_LEGACY_SCNKEY
|
||||
#define CONFIG_KEYBOARD_C128
|
||||
#define CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
// #define CONFIG_KEYBOARD_C128
|
||||
// #define CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
// #define CONFIG_KEYBOARD_C65 // untested
|
||||
// #define CONFIG_KEYBOARD_C65_CAPS_LOCK // untested
|
||||
// #define CONFIG_KEY_REPEAT_DEFAULT
|
||||
|
||||
@@ -50,9 +50,10 @@
|
||||
|
||||
// #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
|
||||
// #define CONFIG_TAPE_NO_ERROR_CORRECTION
|
||||
|
||||
|
||||
// Multiple SID support
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
// #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
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
#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
|
||||
|
||||
@@ -33,10 +33,6 @@
|
||||
// (L,S) = end-of-data marker
|
||||
|
||||
|
||||
// XXX add error correction
|
||||
// XXX implement proper takeover to turbo during sync/pilot
|
||||
|
||||
|
||||
#if CONFIG_TAPE_NORMAL
|
||||
|
||||
|
||||
@@ -50,25 +46,36 @@ load_tape_normal:
|
||||
jsr tape_common_prepare_cia
|
||||
jsr tape_ask_play
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
load_tape_normal_header:
|
||||
|
||||
#else
|
||||
|
||||
load_tape_normal_takeover: // entry point for turbo->normal takeover
|
||||
|
||||
#endif
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
load_tape_normal_header:
|
||||
|
||||
jsr load_MEMUSS_to_STAL
|
||||
|
||||
// Try to load header into tape buffer (we will restore MEMUSS later)
|
||||
|
||||
jsr tape_normal_get_pilot_header
|
||||
#if CONFIG_TAPE_AUTODETECT
|
||||
bcs load_tape_normal_switch_turbo // failed, try turbo
|
||||
#endif
|
||||
|
||||
jsr load_TAPE1_to_MEMUSS
|
||||
jsr tape_normal_get_data_1
|
||||
bcs load_tape_normal_header // unable to read block, try again XXX jump to turbo detection
|
||||
#if !CONFIG_TAPE_AUTODETECT
|
||||
bcs load_tape_normal_header // unable to read block, try again
|
||||
#else
|
||||
bcc !+
|
||||
load_tape_normal_switch_turbo:
|
||||
jsr lvs_STAL_to_MEMUSS
|
||||
jmp load_tape_turbo_takeover // unable to read block, try turbo instead
|
||||
!:
|
||||
#endif
|
||||
|
||||
#if CONFIG_TAPE_NO_ERROR_CORRECTION
|
||||
lda RIPRTY
|
||||
@@ -77,11 +84,15 @@ load_tape_normal_header:
|
||||
jsr load_TAPE1_to_MEMUSS
|
||||
jsr tape_normal_get_data_2
|
||||
#endif
|
||||
bcs load_tape_normal_header // block load error, try again XXX jump to turbo detection
|
||||
#if !CONFIG_TAPE_AUTODETECT
|
||||
bcs load_tape_normal_header // block load error, try again
|
||||
#else
|
||||
bcs load_tape_normal_switch_turbo // block load error, try turbo instead
|
||||
#endif
|
||||
|
||||
// Check header type
|
||||
|
||||
ldy #$00 // XXX probably can be optimized for 65C02
|
||||
ldy #$00
|
||||
lda (TAPE1),y
|
||||
|
||||
cmp #$05
|
||||
@@ -90,7 +101,11 @@ load_tape_normal_header:
|
||||
cmp #$01
|
||||
beq !+
|
||||
cmp #$03
|
||||
#if !CONFIG_TAPE_AUTODETECT
|
||||
bne load_tape_normal_header // header types 1 and 3 are loadable, see Mapping the C64, page 77
|
||||
#else
|
||||
bne load_tape_normal_takeover
|
||||
#endif
|
||||
|
||||
lda #$01
|
||||
sta SA // this file is non-relocatable; override secondary address with 1
|
||||
@@ -99,7 +114,11 @@ load_tape_normal_header:
|
||||
|
||||
jsr lvs_STAL_to_MEMUSS
|
||||
jsr tape_handle_header
|
||||
#if !CONFIG_TAPE_AUTODETECT
|
||||
bcs load_tape_normal_header // if name does not match, look for other header
|
||||
#else
|
||||
bcs load_tape_normal_takeover
|
||||
#endif
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ load_tape_auto:
|
||||
|
||||
#if CONFIG_TAPE_AUTODETECT
|
||||
|
||||
load_tape_turbo_takeover: // entry point for turbo->normal takeover
|
||||
load_tape_turbo_takeover: // entry point for normal->turbo takeover
|
||||
|
||||
jsr tape_common_autodetect
|
||||
bcc_16 load_tape_normal_takeover
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
// Carry clear - normal, Carry set - turbo
|
||||
//
|
||||
|
||||
// XXX implement fallback to autodetection in normal
|
||||
|
||||
|
||||
#if CONFIG_TAPE_AUTODETECT
|
||||
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
#if CONFIG_TAPE_NORMAL
|
||||
|
||||
|
||||
// XXX in tape_normal_get_pilot_header also try to detect turbo
|
||||
|
||||
tape_normal_get_pilot_header: // entry point, reset calibration, require 128x $40 pulses
|
||||
|
||||
// Reading the pilot header is the first action performed,
|
||||
@@ -71,9 +69,14 @@ tape_normal_get_pilot_common_loop_outer:
|
||||
tape_normal_get_pilot_common_loop_inner:
|
||||
|
||||
jsr tape_common_get_pulse
|
||||
// XXX check for short pulses of turbo here
|
||||
bcc tape_normal_get_pilot_common_restart // not a pilot - try again
|
||||
|
||||
|
||||
#if CONFIG_TAPE_AUTODETECT
|
||||
// Try to distinguish turbo by cheecking for short signals
|
||||
cmp #$B9 // see comment in tape_common_autodetect.s
|
||||
bcs !+
|
||||
#endif
|
||||
|
||||
jsr tape_normal_calibrate_during_pilot
|
||||
|
||||
dey
|
||||
@@ -82,6 +85,8 @@ tape_normal_get_pilot_common_loop_inner:
|
||||
dec ROPRTY
|
||||
bne tape_normal_get_pilot_common_loop_outer
|
||||
|
||||
clc
|
||||
!:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user