* On Thu, Jul 01, 2021 at 08:46:45AM -0700 Thomas Winkler wrote:
> In d64copy sourcecode is a function cbm_identify_xp1541().
> If this give TRUE automatically "parallel transfermode" is set.
This function is part of the shared lib, not of d64copy.
> I would like to see same for Zoomfloppy with parallel cable ...
Just use the function cbm_identify_xp1541() from above.
I have to admit, that the name of this function not very good.
> Of cource we could upload a mini drive code to check parallel cable.
> But this need time for upload every time I start an OpenCBM tool.
The function above does exactly what you are saying, in a limited way
- check if a 1541 or 1570/1571 is present.
If none is there, abort and return "no"
If yes, get the address of the parallel port ($1801 on 1541, $4001 on
- then use M-W to set the address $1801/$4001 to $55 (and $1803/$4003,
the DDR, to output), and check if the values arrives on the PC side.
- do the same with $AA.
- if there was a problem with one of the two steps above, abort and
(make sure to set the DDR of the floppy, $1803/$4003, to input mode
- set the DDR to input again and return "yes"
You see, the name of the function is misleading, as it is not XP1541
specific. The reason for this name is as follows: At the time this
function was written, there was no USB device avaible yet.
> Is there a way for solving this?
> Or do you have an idea to do this best?
As said, the function above works "good enough". However, it does not
test very thoroughly (it only tests two bit patterns and only in one
direction), and it is slow (using 5 rounds of M-W commands for a
successfull test, instead of uploading some code and letting the floppy
do it on its own).
The nibtools do a more sophisticated test, but it needs more time to
The function d64copy_check_auto_transfer_mode() in
opencbm/libd64copy/d64copy.c tries to determine the best transfer mode
if the user did not specify any.
It does the following::
1. parallel if available (via cbm_identify_xp1541())
2. if there is only one drive connected, use s2
3. otherwise, use s1
The test for other connected drives (step #2) takes much time, as it
sends a cbm_identify() (and, thus, a LISTEN) to every device number
from 4 to 31 on the bus.
Spiro R. Trikaliotis