some more DolphinDOS infrastructure

This commit is contained in:
FeralChild64 committed 2019-12-26 13:33:12 +01:00
1 parent c573ab6d21
commit 60f2a2ab41
10 files changed
+77 -17

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@ ACPTR:
!:
#if CONFIG_IEC
#if CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
jmp iec_rx_dispatch
#else // no turbo supported
jmp iec_rx_byte
+1 -1
View File
@@ -33,7 +33,7 @@ ciout_store_in_buffer:
ciout_send_byte:
clc // don't send with EOI
#if CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
jsr iec_tx_dispatch
#else // no turbo supported
jsr iec_tx_byte
+1 -1
View File
@@ -30,7 +30,7 @@ iec_send_file_name_loop:
!:
// Transmit one character
sta TBTCNT
#if CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
jsr iec_tx_dispatch
#else // no turbo supported
jsr iec_tx_byte
+2 -2
View File
@@ -111,7 +111,7 @@ load_iec:
load_iec_loop:
// We are now ready to receive bytes
#if CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
jsr iec_rx_dispatch
#else // no turbo supported
jsr iec_rx_byte
@@ -167,7 +167,7 @@ load_iec_loop_end:
load_iec_get_addr_byte:
#if CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
jsr iec_rx_dispatch
#else // no turbo supported
jsr iec_rx_byte
+3 -3
View File
@@ -48,7 +48,7 @@ save_iec:
lda STAL+0
sta TBTCNT
clc
#if CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
jsr iec_tx_dispatch
#else // no turbo supported
jsr iec_tx_byte
@@ -57,7 +57,7 @@ save_iec:
lda STAL+1
sta TBTCNT
clc
#if CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
jsr iec_tx_dispatch
#else // no turbo supported
jsr iec_tx_byte
@@ -78,7 +78,7 @@ iec_save_loop:
// Send the byte
sta TBTCNT
clc
#if CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
jsr iec_tx_dispatch
#else // no turbo supported
jsr iec_tx_byte
+21 -7
View File
@@ -18,13 +18,26 @@
#if CONFIG_IEC_DOLPHINDOS
dolphindos_detect: // XXX find out why this does not work
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
sta CIA2_ICR // disable interrupt generation
lda #$00
sta CIA2_DDRB // set all port B lines as input
// According to logs collected from modified VICE emulator, original DolphinDOS ROM
// constantly reads $DD0D and $DD01 until handshake bit of $DD0D is set, or some kind
// of timeout occurs
php
ldx #$20
dolphindos_detect_loop:
@@ -37,18 +50,19 @@ dolphindos_detect_loop:
dex
bne dolphindos_detect_loop
// Protocol not detected
// FALLTROUGH - protocol not detected
dolphindos_detect_fail:
plp
rts
dolphindos_detect_success:
// XXX protocol not implemented yet
// Protocol detected
panic #$00
lda #$02
sta IECPROTO
plp
rts
@@ -0,0 +1,15 @@
//
// DolphinDOS protocol support for IEC - byte reception
//
#if CONFIG_IEC_DOLPHINDOS
iec_rx_byte_dolphindos:
panic #$00 // XXX implement this
#endif
+6 -1
View File
@@ -4,7 +4,7 @@
//
#if CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
iec_rx_dispatch:
@@ -16,6 +16,11 @@ iec_rx_dispatch:
beq_far iec_rx_byte_jiffydos
#endif // CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_DOLPHINDOS
cmp #$02
beq_far iec_rx_byte_dolphindos
#endif // CONFIG_IEC_DOLPHINDOS
jmp iec_rx_byte
@@ -0,0 +1,15 @@
//
// DolphinDOS protocol support for IEC - byte transfer
//
#if CONFIG_IEC_DOLPHINDOS
iec_tx_byte_dolphindos:
panic #$00 // XXX implement this
#endif
+12 -1
View File
@@ -4,7 +4,7 @@
//
#if CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
iec_tx_dispatch:
@@ -17,6 +17,11 @@ iec_tx_dispatch:
beq iec_tx_dispatch_jiffydos
#endif // CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_DOLPHINDOS
cmp #$02
beq iec_tx_dispatch_dolphindos
#endif // CONFIG_IEC_DOLPHINDOS
// FALLTROUGH
iec_tx_dispatch_normal:
@@ -30,5 +35,11 @@ iec_tx_dispatch_jiffydos:
jmp iec_tx_byte_jiffydos
#endif // CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_DOLPHINDOS
iec_tx_dispatch_dolphindos:
plp
jmp iec_tx_byte_dolphindos
#endif // CONFIG_IEC_DOLPHINDOS
#endif // any turbo supported