                                   trans64.c
                                  version 1.5
                                  
                        Copyright (C) 1994 Bernhard Schwall

The archive contains routines and demo programms for accessing a C64/C128
floppydrive with the original ICE-routines with the PC.

The files:

trans64.c, trans64.h:
Trans64.c contains a set of lowlevelroutines for transfer between the PC and
a C64/C128 floppydrive. The floppy is connected with a simple cable with the
parallelport of the PC (see below). The routines are named as in the C64 so
you can use them as in the C64-ROM. To see which routines are supported and
which parameters are needed look into the file trans64.h. I've tested the
routines with the CBM printer MPS 803, too. So the routines should also work
with your CBM printer.

trans64.pas:
With trans64.pas you can compile a Turbo Pascal Unit to use the routines 
with Turbo-/Borland Pascal. I've done so for my program Trans64.
The file trans64p.obj is the objectcode for include into this unit.

tr_demo.cc:
The program tr_demo.cc is a short demo for the usage of the routines. It 
shows how to load the directory, to load a file and to load a whole disk.
The setup must be done within then main()-routine, but a simple user-interface
if given when starting the program.
When starting the program you must give the port number the cable is 
connected to (1 for LPT1, 2 for LPT2, 3 for LPT3). Also you can set the
delay (same as in Trans64, usefull between 20 and 120) and an experimental
value VLBdelay. This VLBdalay is the number of portaccesses made for one 
'required' portaccess. This could be a possibility to run Trans64 with a
VLB or PCI board. Normally (on ISA-bus) a portaccess will take 1/8.44 MHz
time. On a VLB board this will be faster (I think) so this could be the 
reason why my routines are not running on faster PCs (e.g. 486DX2 66). If you 
can get the program running on your VLB board please tell me what settings 
you are using or what changes you've made in the program.
The precompiled version of TR_DEMO.EXE is complied for the X1541 cable. If
you are using the Disk64E cable you must recompile the program pefore 
testing.

Compilation:

I've compiled the program with Borland C++ 3.1 and with DJGPP 2.57 without
any trouble. With some modifications it can also be compiled under Linux.
To use the routines in your own C/C++ -program just include trans64.h into 
your sourcecode and it should work. There is no limitation to any memory-model
(as far as I know).
To use it with a TurboPascal-program use the file trasn64.pas and 
trans64p.obj. If you want to make changes to the trans64.c you have to 
recompile this file with Borland C++. Use the project-file trans64p.prj to
compile it. After that leave Borland C++, rename the file to trans64p.obj
(e.g. ren trans64.obj trans64p.obj), start TurboPascal and compile
trans64.pas.
To compile tr_demo.cc start Borland C++, open the project-file tr_demo.prj
and 'make' it. To change the configuration for your cable look into main().
To compile tr_demo.cc with DJGPP just type "make -f makefile.gnu" and the
program will be maked.

Cable:

You can use the X1541 cable or the Disk64E cable.
Here is the description of the X1541 cable:

 Sub-D (male)            DIN (female)
   |\
   |  \                      ______
  1| | 14                 /      \
   | |                  / 5*  4*   \
   | |                 |            |
   | |                 |    6*   3* |
   | |                 |            |
   | |                  \ 1*  2*   /
   | |                    \______/
   | |
   | |
   | |
   | |
   | | 25
 13| /
   |/

 connection:
          printer-port   1541     (Disk64E)
 Ground     22-25          2          2
 ATN           1           3          4
 Clock        14           4          5
 Data         17           5          3
 Reset        16           6         (6)

You should connect all pins 22-25(PC) with pin 2 (1541) because it's safer.
The printerport plug is a male one which is connected directly with the
printerport of the PC. The 1541 plug is a female one. You should plug the
IEC-cable shipped with the 1541 into this plug so you don't have to make
the interfacecable longer then it must be. You should use a screend cable
for the interface. You can even build a complete cable between the
printerport and the the 1541 (with a male plug on the side of the 1541)
but then you have to use a screend cable and you should build it as short
as possibe. You can leave the connection 16(PC) - 6(1541). This is
only neaded to reset the floppydrive if the program crashes and you have
to reset your PC. The last column shows the Disk64E cable (1541 side).
You can use this instead of the X1541 cable.


Author:

Copyright (C)1994 by

 Bernhard Schwall
 Broichstr.56
 D-53227 Bonn
 Germany

 email: schwall@athene.informatik.uni-bonn.de


This program comes without any warranty. You are using it at your own risk.
Trans64 is copyrighted software (C)1994 by Bernhard Schwall. The program is
released into the public domain. You may use, modify, copy and distribute 
this without restrictions but without charging money for it.
