BUG REPORT: OpenCB; <--> Zoomfloppy <--> parallel cable issue

19 views
Skip to first unread message

Thomas Winkler

unread,
Jun 28, 2021, 3:40:30 AM6/28/21
to ZoomFloppy Users
Hi 

It seems there is a small bug in communication code maybe ...

I have modified the drive code of TRANSLIB in OpenCBM while workinf on MEMCOPY.
My main drive Code is located at $500 (buffer 2) and Trans-Code is at $700.
Tis main drive Code is waiting for commands from PC:
- send byte
- send 2 byte
- send 256 bytes
- send test pattern
- ...

So Main Code waits for command and depending on command it sends bytes back using Trans Code at $700.

This working fine for S1.
This working fine for S2.
This doesn't work fine for PARALLEL.

Parallel Code has problems on changing direction of data flow.

You can send a megabyte of data without problems.
But always if direction was changed the first byte sent to PC is zero!


I was wondering  about, D64COPY works fine with parallel trans Code.

I find out, parallel transport always send 2 bytes.
While sending 1 byte the second byte is ignored in this protocoll.

I also saw, sending 1 byte always works fine!
D64COPY does send 1 status byte followed by 256 data baytes.
So this is the reason why D64COPY works fine.

But sending 2 Bytes or 256 Bytes or 1024 bytes, always the first byte goes wrong after a change of direction.

I have made waitstates of 20ms on PC side.
But this makes no difference, first byte goes wrong, always.


best regards
Tommy












Nate Lawson

unread,
Jun 28, 2021, 1:55:22 PM6/28/21
to ZoomFloppy Users
Do you think this is specific to the ZF or OpenCBM on other adapters? I don’t think I’ve looked into reversing direction in the d64copy parallel case, and this might be broken for the xu1541 also since that code largely came from there.

-Nate
> --
> You received this message because you are subscribed to the Google Groups "ZoomFloppy Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to zoomfloppy-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/zoomfloppy-users/70f5fb47-afac-4f22-8b0e-f03007541213n%40googlegroups.com.

Thomas Winkler

unread,
Jun 29, 2021, 6:59:15 AM6/29/21
to ZoomFloppy Users
Hi Nate

I'm sorry, I don't have any other adapter working than Zoomfloppy. My XAP-1541 makes no sense since none of my PC has a parallel LPT port.

But I think it is only solvable in Zoomfloppy, cause I use this USB plugin calls (same as D64COPY does):

  opencbm_plugin_pp_dc_write_n(__fd_cbm, data, size);
  opencbm_plugin_pp_dc_read_n(__fd_cbm, data, size);

The problem only occurs on the FIRST "read" after a "write".
All following call to "read" working perfectly.

And it is only the first byte which fails, and content always is 0.

Best regards
Tommy






Reply all
Reply to author
Forward
0 new messages