I/O stack refactoring completed

This commit is contained in:
FeralChild64 committed 2019-10-30 18:59:35 +01:00
1 parent ec98861613
commit ec3e78de88
13 files changed
+84 -23

No files matched your search

+1
View File
@@ -24,6 +24,7 @@ SRCDIR_KERNAL = $(SRCDIR_COMMON) \
c64/kernal/rom_revision \
c64/kernal/rs232 \
c64/kernal/screen \
c64/kernal/tape \
c64/kernal/time
+3 -3
View File
@@ -130,8 +130,8 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on
| `$FFC6` | `$F20E` | `CHKIN` | DONE | |
| `$FFC9` | `$F250` | `CKOUT` | DONE | |
| `$FFCC` | `$F333` | `CLRCHN` | DONE | |
| `$FFCF` | `$F157` | `CHRIN` | PARTIAL | |
| `$FFD2` | `$F1CA` | `CHROUT` | PARTIAL | |
| `$FFCF` | `$F157` | `CHRIN` | PARTIAL | no screen support, keyboard does not preserve .Y |
| `$FFD2` | `$F1CA` | `CHROUT` | DONE | |
| `$FFD5` | `$F49E` | `LOAD` | DONE | |
| `($0330)` | `$F4A5` | `LOAD` | PARTIAL | no VERIFY support, no STOP key support |
| `$FFD8` | `$F5DD` | `SAVE` | DONE | only this preparation routine part is done |
@@ -139,7 +139,7 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on
| `$FFDB` | | `SETTIM` | DONE | |
| `$FFDE` | | `RDTIM` | DONE | |
| `$FFE1` | `$F6ED` | `STOP` | DONE | |
| `$FFE4` | `$F13E` | `GETIN` | PARTIAL | only keyboard supported |
| `$FFE4` | `$F13E` | `GETIN` | PARTIAL | no screen device support |
| `$FFE7` | `$F32F` | `CLALL` | DONE | |
| `$FFEA` | | `UDTIM` | DONE | |
| `$FFED` | | `SCREEN` | DONE | |
+15 -3
View File
@@ -5,12 +5,24 @@
// - [RG64] C64 Programmer's Reference Guide - page 283
// - [CM64] Compute's Mapping the Commodore 64 - page 227/228
//
// CPU registers that has to be preserved (see [RG64]): .X, .Y
// CPU registers that has to be preserved (see [RG64]): for RS-232: .X, .Y
//
GETIN:
// XXX this should be a dispatcher for several different devices!
// Determine the device number
lda DFLTN
jmp read_kb_buf
// Try $00 - keyboard
beq_far getin_keyboard
#if HAS_RS232
// Try $02 - RS-232
cmp #$02
beq_far getin_rs232
#endif // HAS_RS232
jmp chrin_getin
+12
View File
@@ -0,0 +1,12 @@
//
// IEC part of the CHROUT routine
//
chrout_iec:
lda SCHAR
jsr JCIOUT
bcc_far chrout_done_success
jmp chrout_done_fail
+2
View File
@@ -35,6 +35,8 @@ CHRIN:
#endif // HAS_RS232
chrin_getin: // jump entry for GETIN
#if CONFIG_IEC
// Try IEC devices
@@ -6,7 +6,7 @@
// - [CM64] Compute's Mapping the Commodore 64 - page 228
//
// CPU registers that has to be preserved (see [RG64]): .Y
// Additionally we have to preserve .X for out CHRIN implementation
// Additionally we have to preserve .X for out CHRIN and implementation
//
CHROUT:
@@ -27,17 +27,17 @@ CHROUT:
lda DFLTO
cmp #$03 // screen
bne !+
jmp chrout_screen
!:
beq_far chrout_screen
#if HAS_RS232
cmp #$02
beq_far chrout_rs232
#endif
#if CONFIG_IEC
jsr iec_check_devnum_oc
bcs chrout_done_unknown_device // not a supported device
chrout_iec:
lda SCHAR
jsr JCIOUT
bcc chrout_done_success
bcc_far chrout_iec
#if CONFIG_IEC
// FALLTROUGH
File renamed without changes.
+11 -1
View File
@@ -40,9 +40,19 @@ LOAD:
// Check whether we support the requested device
lda FA
#if CONFIG_TAPE_NORMAL
cmp #$01
beq_far load_tape_normal
#endif
#if CONFIG_TAPE_TURBO
cmp #$07
beq_far load_tape_turbo
#endif
#if CONFIG_IEC
jsr iec_check_devnum_lvs
bcc_far load_iec
#endif // CONFIG_IEC
#endif
jmp lvs_illegal_device_number
@@ -6,7 +6,7 @@
//
read_kb_buf:
getin_keyboard: // XXX confirm that here is really a part of GETIN!
// Check for a key
lda NDX
-2
View File
@@ -3,8 +3,6 @@
// RS-232 part of the CHROUT routine
//
// XXX connect to I/O stack
#if HAS_RS232
-2
View File
@@ -3,8 +3,6 @@
// RS-232 part of the GETIN routine
//
// XXX connect to I/O stack
#if HAS_RS232
+14
View File
@@ -0,0 +1,14 @@
//
// Tape (normal) part of the LOAD routine
//
#if CONFIG_TAPE_NORMAL
load_tape_normal:
STUB_IMPLEMENTATION()
#endif
+14
View File
@@ -0,0 +1,14 @@
//
// Tape (turbo) part of the LOAD routine
//
#if CONFIG_TAPE_TURBO
load_tape_turbo:
STUB_IMPLEMENTATION()
#endif