improved tape adapters support

This commit is contained in:
FeralChild64 committed 2019-12-30 21:06:34 +01:00
1 parent f05ddef5fd
commit 465753b0a2
10 files changed
+68 -5

No files matched your search

+8
View File
@@ -143,6 +143,14 @@ Adds a minimal turbo tape support - just LOAD command (device 7, like on _Action
Needs about 650 bytes in KERNAL segment (if both normal and turbo are enabled, about 950 bytes are needed, as they share some code). If unsure - enable.
### `CONFIG_TAPE_NO_KEY_SENSE`
Enable this option if you are using a tape interface adapter with some audio signal source connected. These adapters lack key sense functionality, so the computer is unable to tell whether Play got pressed or not - with this option ROM will assume Play got pressed after imppulses start arriving from the tape.
### `CONFIG_TAPE_NO_MOTOR_CONTROL`
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.
## Multiple SID support
The SID is a sound chip - original machine had one installed. However, mods exists to add more of them for improved sound capabilitiee. 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.
+1 -1
View File
@@ -2,7 +2,7 @@
# Test files
TESTDISK = testsuite/testdisk.d64
TESTTAPE = testsuite/testtape-c64-pal-normal.tap
TESTTAPE = testsuite/testtape-c64-pal-turbo.tap
# Source files
+1
View File
@@ -13,6 +13,7 @@ Here are the features of the Open ROMs not found in the original ROMs from the 8
* DOS wedge (direct mode only) - `@<drive_number>`, `@<command>`, `@$`, `@$<params>`, `@`
* turbo tape load support (as device 7, or using `←L`), up to 250 blocks (can store bytes under I/O)
* improved support for tape adapters (for using regular casette players and other audio devices instead of Datasette)
* extended `LOAD` command
* start/end addresses are displayed, in the Final cartridge style
+2
View File
@@ -55,6 +55,8 @@
#define CONFIG_TAPE_NORMAL
#define CONFIG_TAPE_TURBO
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
// #define CONFIG_RS232_UP2400 // please keep disabled for now
// #define CONFIG_RS232_UP9600 // please keep disabled for now
+2
View File
@@ -49,6 +49,8 @@
#define CONFIG_TAPE_NORMAL
#define CONFIG_TAPE_TURBO
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
// Multiple SID support
+2
View File
@@ -49,6 +49,8 @@
// #define CONFIG_TAPE_NORMAL
// #define CONFIG_TAPE_TURBO
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
// Multiple SID support
+2
View File
@@ -49,6 +49,8 @@
// #define CONFIG_TAPE_NORMAL
#define CONFIG_TAPE_TURBO
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
// Multiple SID support
+2
View File
@@ -49,6 +49,8 @@
#define CONFIG_TAPE_NORMAL
#define CONFIG_TAPE_TURBO
// #define CONFIG_TAPE_NO_KEY_SENSE
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
// Multiple SID support
+2 -2
View File
@@ -16,7 +16,7 @@ iec_wait1ms:
ldx #18 // we probably won't start with the beginning of raster
#endif // CONFIG_IEC
#if CONFIG_IEC || CONFIG_TAPE_TURBO || CONFIG_TAPE_NORMAL
#if CONFIG_IEC || (!CONFIG_TAPE_NO_MOTOR_CONTROL && (CONFIG_TAPE_TURBO || CONFIG_TAPE_NORMAL))
wait_x_bars: // additional entry point for tape support
// has to preserve .Y and put .X to 0
@@ -34,4 +34,4 @@ iec_wait_rts: // dummy RTS, for very short waits
rts
#endif // CONFIG_IEC || CONFIG_TAPE_TURBO || CONFIG_TAPE_NORMAL
#endif
+46 -2
View File
@@ -28,12 +28,16 @@ tape_ask_play:
sei // timing is critical for tape loading
#if !CONFIG_TAPE_NO_KEY_SENSE
// First check whether the button is already pressed
lda CPU_R6510
and #$10
beq tape_wait_play_done
#endif
// Display message
ldx #__MSG_KERNAL_PRESS_PLAY
@@ -41,6 +45,8 @@ tape_ask_play:
// FALLTROUGH
#if !CONFIG_TAPE_NO_KEY_SENSE
tape_wait_play_loop:
jsr udtim_keyboard
@@ -51,6 +57,26 @@ tape_wait_play_loop:
and #$10 // check for pressed button
bne tape_wait_play_loop
// FALLTROUGH
#else
// We have no key sense - so just turn the motor on and wait for the first pulse
jsr tape_motor_on
lda #$10
!:
bit CIA1_ICR // $DC0D
bne !-
!:
bit CIA1_ICR // $DC0D
beq !-
#endif
// FALLTROUGH
tape_wait_play_done:
// Prepare for reading
@@ -68,8 +94,12 @@ tape_wait_play_done:
tape_handle_header:
#if !CONFIG_TAPE_NO_MOTOR_CONTROL
jsr tape_screen_on_motor_off
#endif
// Print FOUND + file name
ldx #__MSG_KERNAL_FOUND
@@ -83,11 +113,15 @@ tape_handle_header:
cpy #$15
bne !-
#if !CONFIG_TAPE_NO_MOTOR_CONTROL
// Header, wait for user decision
jsr tape_header_get_decision
bcs tape_break_error
#endif
// Check if file name matches
jsr tape_match_filename
@@ -151,14 +185,20 @@ tape_handle_header:
jsr lvs_display_loading_verifying
// FALLTROUGH
#if !CONFIG_TAPE_NO_MOTOR_CONTROL
tape_handle_header_displayed:
// Load the file
jsr tape_screen_off_motor_on
// FALLTROUGH
#endif
tape_return_ok:
clc
@@ -211,6 +251,8 @@ tape_match_loop:
rts
#if !CONFIG_TAPE_NO_MOTOR_CONTROL
//
// Get user decision whether to load the file or not
//
@@ -223,7 +265,7 @@ tape_header_get_decision:
lda STKEY
bpl tape_header_wait_stop // STOP pressed
and #$10
beq tape_header_wait_space // space pressed
beq tape_header_wait_space // SPACE pressed
ldx #$80
jsr wait_x_bars // sets .X to 0
@@ -245,6 +287,8 @@ tape_header_wait_stop:
sec
rts
#endif
//
// Report that file loading succeeded (or not)