IEC support is now optional
This commit is contained in:
1 parent
c03c7abf45
commit
65c27f4dd4
12 files changed
+64
-36
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 #<FNADDR+0
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (FNADDR),y
|
||||
#endif
|
||||
|
||||
iny
|
||||
// Set Carry flag on the last file name character, to mark EOI
|
||||
cpy FNLEN
|
||||
clc
|
||||
bne !+
|
||||
sec
|
||||
!:
|
||||
// Transmit one character
|
||||
sta TBTCNT
|
||||
jsr iec_tx_byte
|
||||
jmp iec_send_file_name_loop
|
||||
|
||||
iec_send_file_name_done:
|
||||
jsr UNLSN
|
||||
rts
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
@@ -45,7 +45,7 @@ load_iec:
|
||||
bcs load_iec_dev_not_found
|
||||
|
||||
// Send file name
|
||||
jsr lvs_send_file_name
|
||||
jsr iec_send_file_name
|
||||
bcs load_iec_error
|
||||
|
||||
// Now command device to talk (p16)
|
||||
|
||||
@@ -30,7 +30,7 @@ open_iec:
|
||||
#endif
|
||||
|
||||
// Send command ('file name')
|
||||
jsr lvs_send_file_name
|
||||
jsr iec_send_file_name
|
||||
|
||||
open_iec_done:
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ save_iec:
|
||||
bcs // XXX error
|
||||
|
||||
// Send file name
|
||||
jsr lvs_send_file_name
|
||||
jsr iec_send_file_name
|
||||
bcs load_iec_error
|
||||
|
||||
// XXX finish the implementation
|
||||
|
||||
@@ -111,7 +111,13 @@ IOINIT:
|
||||
lda #%00000011
|
||||
sta CIA2_PRA
|
||||
|
||||
rts
|
||||
#if CONFIG_IEC
|
||||
|
||||
// Set IEC bus to its initial idle state
|
||||
jmp iec_set_idle
|
||||
|
||||
#else
|
||||
|
||||
rts
|
||||
|
||||
#endif
|
||||
@@ -37,7 +37,7 @@ CHROUT:
|
||||
#if CONFIG_IEC
|
||||
jsr iec_check_devnum_oc
|
||||
bcc_far chrout_iec
|
||||
#if CONFIG_IEC
|
||||
#endif
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
|
||||
@@ -3,33 +3,6 @@
|
||||
// Helper functions for various LOAD/VERIVY/SAVE routine variants (IEC / U64 / etc.)
|
||||
//
|
||||
|
||||
lvs_send_file_name:
|
||||
ldy #0
|
||||
lvs_send_file_name_loop:
|
||||
cpy FNLEN
|
||||
beq lvs_send_file_name_done
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<FNADDR+0
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (FNADDR),y
|
||||
#endif
|
||||
|
||||
iny
|
||||
// Set Carry flag on the last file name character, to mark EOI
|
||||
cpy FNLEN
|
||||
clc
|
||||
bne !+
|
||||
sec
|
||||
!:
|
||||
// Transmit one character
|
||||
sta TBTCNT
|
||||
jsr iec_tx_byte
|
||||
jmp lvs_send_file_name_loop
|
||||
lvs_send_file_name_done:
|
||||
jsr UNLSN
|
||||
rts
|
||||
|
||||
lvs_handle_byte_load_verify:
|
||||
|
||||
|
||||
Reference in new issue
Block a user