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

+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