more work towards IEC burst support

This commit is contained in:
FeralChild64 committed 2019-12-31 17:31:25 +01:00
1 parent 465753b0a2
commit 58b21e3fa4
11 files changed
+88 -99

No files matched your search

+1 -1
View File
@@ -129,7 +129,7 @@ Needs about 430 bytes in KERNAL segment. If unsure - enable.
### `CONFIG_IEC_JIFFYDOS_BLANK`
Causes screen blanking during iffyDOS file loading to increase performance.
Causes screen blanking during JiffyDOS file loading to increase performance.
### `CONFIG_TAPE_NORMAL`
+1 -2
View File
@@ -8,8 +8,7 @@ Here are the features of the Open ROMs not found in the original ROMs from the 8
* joystick can be used to move text cursor
* pre-defined function keys
* JiffyDOS protocol support
* partial DolphinDOS protocol support
* JiffyDOS and DolphinDOS protocols support
* 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)
+7 -6
View File
@@ -17,18 +17,19 @@ iec_cmd_open: // similar to TKSA, but without turnaround
!:
ora #$F0
#if CONFIG_IEC_DOLPHINDOS || CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_SOFT
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_SOFT
pha
jsr burst_advertise
pla
#endif
#if CONFIG_IEC_DOLPHINDOS
sta TBTCNT
jsr iec_tx_command
bcs !+ // branch if error
#if CONFIG_IEC_DOLPHINDOS
jsr dolphindos_detect
#endif
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_SOFT
jsr burst_detect
#endif
jmp iec_tx_command_finalize
+4 -3
View File
@@ -57,6 +57,10 @@ load_iec:
jsr TALK
bcs load_iec_error
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_SOFT
jsr burst_advertise
#endif
lda #$60 // open channel / data (p3) , required according to p13
sta TBTCNT
jsr iec_tx_command
@@ -65,9 +69,6 @@ load_iec:
#if CONFIG_IEC_DOLPHINDOS
jsr dolphindos_detect
#endif
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_SOFT
jsr burst_detect
#endif
// We are currently talker, so do the IEC turn around so that we
// are the listener (p16)
+4 -3
View File
@@ -39,6 +39,10 @@ save_iec:
jsr LISTEN
bcs save_iec_dev_not_found
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_SOFT
jsr burst_advertise
#endif
lda #$61 // open channel / data (p3) , required according to p13
sta TBTCNT
jsr iec_tx_command
@@ -47,9 +51,6 @@ save_iec:
#if CONFIG_IEC_DOLPHINDOS
jsr dolphindos_detect
#endif
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_SOFT
jsr burst_detect
#endif
// Save start address
lda STAL+0
@@ -0,0 +1,33 @@
//
// Advertise burst IEC protocol support to the receiver
//
//
// Based on idea by Pasi 'Albert' Ojala and description from
// https://sites.google.com/site/h2obsession/CBM/C128/fast-serial-for-uiec
//
#if CONFIG_IEC_BURST_CIA1
burst_advertise:
#if CONFIG_IEC_JIFFYDOS
// Skip if other protocol (only JiffyDOS is possible at this moment) already detected
lda IECPROTO
bmi !+
bne burst_advertise_done
!:
#endif
panic #$FF // XXX implement this
burst_advertise_done:
rts
#endif
-31
View File
@@ -1,31 +0,0 @@
//
// Helper routine for burst IEC protocol support
//
//
// Based on idea by Pasi 'Albert' Ojala
//
#if CONFIG_IEC_BURST_CIA1
burst_detect:
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
lda IECPROTO
bmi !+
bne burst_detect_fail // skip if other protocol already detected
!:
#endif
panic #$FF // XXX implement this
burst_detect_fail:
rts
#endif
@@ -1,29 +1,30 @@
//
// Helper routine for burst IEC protocol support
// Advertise burst IEC protocol support to the receiver
//
//
// Based on idea by Pasi 'Albert' Ojala
// Based on idea by Pasi 'Albert' Ojala and description from
// https://sites.google.com/site/h2obsession/CBM/C128/fast-serial-for-uiec
//
#if CONFIG_IEC_BURST_CIA2
burst_detect:
burst_advertise:
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
#if CONFIG_IEC_JIFFYDOS
// Skip if other protocol (only JiffyDOS is possible at this moment) already detected
lda IECPROTO
bmi !+
bne burst_detect_fail // skip if other protocol already detected
bne burst_advertise_done
!:
#endif
// For extra safety, do it on disabled interupts
php
sei
// Make sure this is not done under ATN
jst iec_release_atn
// Set the clock rate to the fastest possible
ldy #$01
@@ -46,19 +47,9 @@ burst_detect:
bit CIA2_ICR
beq !-
// Now see if we get any byte back
lda CIA2_SDR // XXX we do not need a value, we need to know if it was received
panic #$00 // XXX finish this routine
plp
// FALLTROUGH
burst_detect_fail:
burst_advertise_done:
rts
@@ -0,0 +1,28 @@
//
// Advertise burst IEC protocol support to the receiver
//
#if CONFIG_IEC_BURST_SOFT
burst_advertise:
#if CONFIG_IEC_JIFFYDOS
// Skip if other protocol (only JiffyDOS is possible at this moment) already detected
lda IECPROTO
bmi !+
bne burst_advertise_done:
!:
#endif
panic #$FF // XXX implement this
burst_advertise_done:
rts
#endif
-27
View File
@@ -1,27 +0,0 @@
//
// Helper routine for burst IEC protocol support
//
#if CONFIG_IEC_BURST_SOFT
burst_detect:
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
lda IECPROTO
bmi !+
bne burst_detect_fail // skip if other protocol already detected
!:
#endif
panic #$FF // XXX implement this
burst_detect_fail:
rts
#endif
-7
View File
@@ -20,13 +20,6 @@
dolphindos_detect:
#if CONFIG_IEC_JIFFYDOS
lda IECPROTO
bne dolphindos_detect_fail // skip if other protocol already detected
#endif
// Make sure the port settings are correct
lda #$7F