more work towards IEC burst support
This commit is contained in:
1 parent
465753b0a2
commit
58b21e3fa4
11 files changed
+88
-99
No files matched your search
@@ -129,7 +129,7 @@ Needs about 430 bytes in KERNAL segment. If unsure - enable.
|
|||||||
|
|
||||||
### `CONFIG_IEC_JIFFYDOS_BLANK`
|
### `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`
|
### `CONFIG_TAPE_NORMAL`
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
* joystick can be used to move text cursor
|
||||||
* pre-defined function keys
|
* pre-defined function keys
|
||||||
|
|
||||||
* JiffyDOS protocol support
|
* JiffyDOS and DolphinDOS protocols support
|
||||||
* partial DolphinDOS protocol support
|
|
||||||
* DOS wedge (direct mode only) - `@<drive_number>`, `@<command>`, `@$`, `@$<params>`, `@`
|
* 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)
|
* turbo tape load support (as device 7, or using `←L`), up to 250 blocks (can store bytes under I/O)
|
||||||
|
|||||||
@@ -17,18 +17,19 @@ iec_cmd_open: // similar to TKSA, but without turnaround
|
|||||||
!:
|
!:
|
||||||
ora #$F0
|
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
|
sta TBTCNT
|
||||||
jsr iec_tx_command
|
jsr iec_tx_command
|
||||||
bcs !+ // branch if error
|
bcs !+ // branch if error
|
||||||
|
|
||||||
#if CONFIG_IEC_DOLPHINDOS
|
|
||||||
jsr dolphindos_detect
|
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
|
jmp iec_tx_command_finalize
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,10 @@ load_iec:
|
|||||||
jsr TALK
|
jsr TALK
|
||||||
bcs load_iec_error
|
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
|
lda #$60 // open channel / data (p3) , required according to p13
|
||||||
sta TBTCNT
|
sta TBTCNT
|
||||||
jsr iec_tx_command
|
jsr iec_tx_command
|
||||||
@@ -65,9 +69,6 @@ load_iec:
|
|||||||
#if CONFIG_IEC_DOLPHINDOS
|
#if CONFIG_IEC_DOLPHINDOS
|
||||||
jsr dolphindos_detect
|
jsr dolphindos_detect
|
||||||
#endif
|
#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
|
// We are currently talker, so do the IEC turn around so that we
|
||||||
// are the listener (p16)
|
// are the listener (p16)
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ save_iec:
|
|||||||
jsr LISTEN
|
jsr LISTEN
|
||||||
bcs save_iec_dev_not_found
|
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
|
lda #$61 // open channel / data (p3) , required according to p13
|
||||||
sta TBTCNT
|
sta TBTCNT
|
||||||
jsr iec_tx_command
|
jsr iec_tx_command
|
||||||
@@ -47,9 +51,6 @@ save_iec:
|
|||||||
#if CONFIG_IEC_DOLPHINDOS
|
#if CONFIG_IEC_DOLPHINDOS
|
||||||
jsr dolphindos_detect
|
jsr dolphindos_detect
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_SOFT
|
|
||||||
jsr burst_detect
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Save start address
|
// Save start address
|
||||||
lda STAL+0
|
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
|
||||||
@@ -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
|
|
||||||
+10
-19
@@ -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
|
#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
|
lda IECPROTO
|
||||||
bmi !+
|
bmi !+
|
||||||
bne burst_detect_fail // skip if other protocol already detected
|
bne burst_advertise_done
|
||||||
!:
|
!:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For extra safety, do it on disabled interupts
|
// Make sure this is not done under ATN
|
||||||
php
|
jst iec_release_atn
|
||||||
sei
|
|
||||||
|
|
||||||
// Set the clock rate to the fastest possible
|
// Set the clock rate to the fastest possible
|
||||||
ldy #$01
|
ldy #$01
|
||||||
@@ -46,19 +47,9 @@ burst_detect:
|
|||||||
bit CIA2_ICR
|
bit CIA2_ICR
|
||||||
beq !-
|
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
|
// FALLTROUGH
|
||||||
|
|
||||||
burst_detect_fail:
|
burst_advertise_done:
|
||||||
|
|
||||||
rts
|
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
|
||||||
@@ -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
|
|
||||||
@@ -20,13 +20,6 @@
|
|||||||
|
|
||||||
dolphindos_detect:
|
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
|
// Make sure the port settings are correct
|
||||||
|
|
||||||
lda #$7F
|
lda #$7F
|
||||||
|
|||||||
Reference in new issue
Block a user