some more DolphinDOS infrastructure
This commit is contained in:
1 parent
c573ab6d21
commit
60f2a2ab41
10 files changed
+77
-17
No files matched your search
@@ -20,7 +20,7 @@ ACPTR:
|
|||||||
!:
|
!:
|
||||||
|
|
||||||
#if CONFIG_IEC
|
#if CONFIG_IEC
|
||||||
#if CONFIG_IEC_JIFFYDOS
|
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
||||||
jmp iec_rx_dispatch
|
jmp iec_rx_dispatch
|
||||||
#else // no turbo supported
|
#else // no turbo supported
|
||||||
jmp iec_rx_byte
|
jmp iec_rx_byte
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ ciout_store_in_buffer:
|
|||||||
ciout_send_byte:
|
ciout_send_byte:
|
||||||
|
|
||||||
clc // don't send with EOI
|
clc // don't send with EOI
|
||||||
#if CONFIG_IEC_JIFFYDOS
|
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
||||||
jsr iec_tx_dispatch
|
jsr iec_tx_dispatch
|
||||||
#else // no turbo supported
|
#else // no turbo supported
|
||||||
jsr iec_tx_byte
|
jsr iec_tx_byte
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ iec_send_file_name_loop:
|
|||||||
!:
|
!:
|
||||||
// Transmit one character
|
// Transmit one character
|
||||||
sta TBTCNT
|
sta TBTCNT
|
||||||
#if CONFIG_IEC_JIFFYDOS
|
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
||||||
jsr iec_tx_dispatch
|
jsr iec_tx_dispatch
|
||||||
#else // no turbo supported
|
#else // no turbo supported
|
||||||
jsr iec_tx_byte
|
jsr iec_tx_byte
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ load_iec:
|
|||||||
load_iec_loop:
|
load_iec_loop:
|
||||||
|
|
||||||
// We are now ready to receive bytes
|
// We are now ready to receive bytes
|
||||||
#if CONFIG_IEC_JIFFYDOS
|
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
||||||
jsr iec_rx_dispatch
|
jsr iec_rx_dispatch
|
||||||
#else // no turbo supported
|
#else // no turbo supported
|
||||||
jsr iec_rx_byte
|
jsr iec_rx_byte
|
||||||
@@ -167,7 +167,7 @@ load_iec_loop_end:
|
|||||||
|
|
||||||
load_iec_get_addr_byte:
|
load_iec_get_addr_byte:
|
||||||
|
|
||||||
#if CONFIG_IEC_JIFFYDOS
|
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
||||||
jsr iec_rx_dispatch
|
jsr iec_rx_dispatch
|
||||||
#else // no turbo supported
|
#else // no turbo supported
|
||||||
jsr iec_rx_byte
|
jsr iec_rx_byte
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ save_iec:
|
|||||||
lda STAL+0
|
lda STAL+0
|
||||||
sta TBTCNT
|
sta TBTCNT
|
||||||
clc
|
clc
|
||||||
#if CONFIG_IEC_JIFFYDOS
|
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
||||||
jsr iec_tx_dispatch
|
jsr iec_tx_dispatch
|
||||||
#else // no turbo supported
|
#else // no turbo supported
|
||||||
jsr iec_tx_byte
|
jsr iec_tx_byte
|
||||||
@@ -57,7 +57,7 @@ save_iec:
|
|||||||
lda STAL+1
|
lda STAL+1
|
||||||
sta TBTCNT
|
sta TBTCNT
|
||||||
clc
|
clc
|
||||||
#if CONFIG_IEC_JIFFYDOS
|
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
||||||
jsr iec_tx_dispatch
|
jsr iec_tx_dispatch
|
||||||
#else // no turbo supported
|
#else // no turbo supported
|
||||||
jsr iec_tx_byte
|
jsr iec_tx_byte
|
||||||
@@ -78,7 +78,7 @@ iec_save_loop:
|
|||||||
// Send the byte
|
// Send the byte
|
||||||
sta TBTCNT
|
sta TBTCNT
|
||||||
clc
|
clc
|
||||||
#if CONFIG_IEC_JIFFYDOS
|
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
||||||
jsr iec_tx_dispatch
|
jsr iec_tx_dispatch
|
||||||
#else // no turbo supported
|
#else // no turbo supported
|
||||||
jsr iec_tx_byte
|
jsr iec_tx_byte
|
||||||
|
|||||||
@@ -18,13 +18,26 @@
|
|||||||
#if CONFIG_IEC_DOLPHINDOS
|
#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
|
// 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
|
// constantly reads $DD0D and $DD01 until handshake bit of $DD0D is set, or some kind
|
||||||
// of timeout occurs
|
// of timeout occurs
|
||||||
|
|
||||||
php
|
|
||||||
ldx #$20
|
ldx #$20
|
||||||
|
|
||||||
dolphindos_detect_loop:
|
dolphindos_detect_loop:
|
||||||
@@ -37,18 +50,19 @@ dolphindos_detect_loop:
|
|||||||
dex
|
dex
|
||||||
bne dolphindos_detect_loop
|
bne dolphindos_detect_loop
|
||||||
|
|
||||||
// Protocol not detected
|
// FALLTROUGH - protocol not detected
|
||||||
|
|
||||||
|
dolphindos_detect_fail:
|
||||||
|
|
||||||
plp
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
dolphindos_detect_success:
|
dolphindos_detect_success:
|
||||||
|
|
||||||
// XXX protocol not implemented yet
|
// Protocol detected
|
||||||
|
|
||||||
panic #$00
|
lda #$02
|
||||||
|
sta IECPROTO
|
||||||
|
|
||||||
plp
|
|
||||||
rts
|
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
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#if CONFIG_IEC_JIFFYDOS
|
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
||||||
|
|
||||||
|
|
||||||
iec_rx_dispatch:
|
iec_rx_dispatch:
|
||||||
@@ -16,6 +16,11 @@ iec_rx_dispatch:
|
|||||||
beq_far iec_rx_byte_jiffydos
|
beq_far iec_rx_byte_jiffydos
|
||||||
#endif // CONFIG_IEC_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
|
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
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#if CONFIG_IEC_JIFFYDOS
|
#if CONFIG_IEC_JIFFYDOS || CONFIG_IEC_DOLPHINDOS
|
||||||
|
|
||||||
|
|
||||||
iec_tx_dispatch:
|
iec_tx_dispatch:
|
||||||
@@ -17,6 +17,11 @@ iec_tx_dispatch:
|
|||||||
beq iec_tx_dispatch_jiffydos
|
beq iec_tx_dispatch_jiffydos
|
||||||
#endif // CONFIG_IEC_JIFFYDOS
|
#endif // CONFIG_IEC_JIFFYDOS
|
||||||
|
|
||||||
|
#if CONFIG_IEC_DOLPHINDOS
|
||||||
|
cmp #$02
|
||||||
|
beq iec_tx_dispatch_dolphindos
|
||||||
|
#endif // CONFIG_IEC_DOLPHINDOS
|
||||||
|
|
||||||
// FALLTROUGH
|
// FALLTROUGH
|
||||||
|
|
||||||
iec_tx_dispatch_normal:
|
iec_tx_dispatch_normal:
|
||||||
@@ -30,5 +35,11 @@ iec_tx_dispatch_jiffydos:
|
|||||||
jmp iec_tx_byte_jiffydos
|
jmp iec_tx_byte_jiffydos
|
||||||
#endif // CONFIG_IEC_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
|
#endif // any turbo supported
|
||||||
Reference in new issue
Block a user