initial code for DolphinDOS detection (not working yet)

This commit is contained in:
FeralChild64 committed 2019-12-18 19:26:24 +01:00
1 parent f1e5a4cb3e
commit 782a7c63a0
2 files changed
+39 -1

No files matched your search

+9
View File
@@ -41,9 +41,18 @@ common_talk_listen: // common part of TALK and LISTEN
#endif // CONFIG_IEC_JIFFYDOS
#if CONFIG_IEC_DOLPHINDOS
jsr iec_tx_command
jmp dolphindos_detect
#else
jmp iec_tx_command
#endif // no CONFIG_IEC_JIFFYDOS
#else
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
+30 -1
View File
@@ -18,9 +18,38 @@
#if CONFIG_IEC_DOLPHINDOS
dolphindos_detect:
dolphindos_detect: // XXX find out why this does not work
// 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:
lda CIA2_ICR
and #$10
bne dolphindos_detect_success
lda CIA2_PRB // XXX do we need this read?
dex
bne dolphindos_detect_loop
// Protocol not detected
plp
rts
dolphindos_detect_success:
// XXX protocol not implemented yet
panic #$00
plp
rts
#endif // CONFIG_IEC_DOLPHINDOS