From 65c27f4dd492e310050cbdfc17ad969a7a8bdeb2 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Thu, 31 Oct 2019 17:33:30 +0100 Subject: [PATCH] IEC support is now optional --- CONFIG.md | 8 ++++++ c64/,,config_generic.s | 2 +- c64/,,config_mega65.s | 2 +- c64/,,config_testing.s | 2 +- c64/,,config_ultimate64.s | 2 +- c64/kernal/iec/iec_send_file_name.s | 41 +++++++++++++++++++++++++++++ c64/kernal/iec/load_iec.s | 2 +- c64/kernal/iec/open_iec.s | 2 +- c64/kernal/iec/save_iec.s | 2 +- c64/kernal/init/fda3.ioinit.s | 8 +++++- c64/kernal/iostack/f1ca.chrout.s | 2 +- c64/kernal/iostack/lvs_helpers.s | 27 ------------------- 12 files changed, 64 insertions(+), 36 deletions(-) create mode 100644 c64/kernal/iec/iec_send_file_name.s diff --git a/CONFIG.md b/CONFIG.md index 238193df..dc56c121 100644 --- a/CONFIG.md +++ b/CONFIG.md @@ -95,6 +95,14 @@ Uses RAM under BASIC, I/O and KERNAL, takes over `$C000`-`$CFFF` area requires s Comparing to standard memoryy model, it needs about 180 bytes in BASIC segment and 80 bytes in KERNAL segment - at the moment of doing the test, these values are expected to change often. +## I/O devices + +### `CONFIG_IEC` + +Adds support for the IEEC bus - for serial printers, disk drives, etc. + +Needs over 1000 bytes in KERNAL segment. If unsure - enable. + ## 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. diff --git a/c64/,,config_generic.s b/c64/,,config_generic.s index 133318f8..a860d7b5 100644 --- a/c64/,,config_generic.s +++ b/c64/,,config_generic.s @@ -40,7 +40,7 @@ // I/O devices -#define CONFIG_IEC // please keep enabled for now +#define CONFIG_IEC // #define CONFIG_IEC_JIFFYDOS // please keep disabled for now // #define CONFIG_TAPE_NORMAL // please keep disabled for now // #define CONFIG_TAPE_TURBO // please keep disabled for now diff --git a/c64/,,config_mega65.s b/c64/,,config_mega65.s index 146e5bb4..07e095b3 100644 --- a/c64/,,config_mega65.s +++ b/c64/,,config_mega65.s @@ -42,7 +42,7 @@ // I/O devices -#define CONFIG_IEC // please keep enabled for now +#define CONFIG_IEC // #define CONFIG_IEC_JIFFYDOS // please keep disabled for now // #define CONFIG_TAPE_NORMAL // please keep disabled for now // #define CONFIG_TAPE_TURBO // please keep disabled for now diff --git a/c64/,,config_testing.s b/c64/,,config_testing.s index 14953bc8..b3180033 100644 --- a/c64/,,config_testing.s +++ b/c64/,,config_testing.s @@ -41,7 +41,7 @@ // I/O devices -#define CONFIG_IEC // please keep enabled for now +#define CONFIG_IEC // #define CONFIG_IEC_JIFFYDOS // please keep disabled for now // #define CONFIG_TAPE_NORMAL // please keep disabled for now // #define CONFIG_TAPE_TURBO // please keep disabled for now diff --git a/c64/,,config_ultimate64.s b/c64/,,config_ultimate64.s index 11c5a174..c10abe2f 100644 --- a/c64/,,config_ultimate64.s +++ b/c64/,,config_ultimate64.s @@ -40,7 +40,7 @@ // I/O devices -#define CONFIG_IEC // please keep enabled for now +#define CONFIG_IEC // #define CONFIG_IEC_JIFFYDOS // please keep disabled for now // #define CONFIG_TAPE_NORMAL // please keep disabled for now // #define CONFIG_TAPE_TURBO // please keep disabled for now diff --git a/c64/kernal/iec/iec_send_file_name.s b/c64/kernal/iec/iec_send_file_name.s new file mode 100644 index 00000000..b0adc685 --- /dev/null +++ b/c64/kernal/iec/iec_send_file_name.s @@ -0,0 +1,41 @@ + +// +// Sends file (stream) name to IEC device +// + + +#if CONFIG_IEC + + +iec_send_file_name: + ldy #0 + +iec_send_file_name_loop: + cpy FNLEN + beq iec_send_file_name_done + +#if CONFIG_MEMORY_MODEL_60K + ldx #