[comp.sys.amiga.hardware] Connecting Amiga 2000 & C-64

colin@ultima.cs.uts.oz (Colin Panisset) (07/26/90)

	Q : I am attempting to connect an Amiga 2000 to a Commodore 64 via
the parallel port on the Amiga, and the user port on the 64. My problem is this:
apart from the eight data lines (D0-D7), there has to be (by reckoning) at least
one handshaking line. The Amiga has ACK and STROBE, which look to be candidates,
and the 64 has FLAG1 and PA2, which also look to be candidates. (FLAG1 can be
used to generate an interrupt upon receipt of incoming signal, PA2 is bit 2
of port 2). Which lines should be connected to each other? If anyone has had
experience with this sort of problem, can they assist in any way?
	The reason for this somewhat bizzare exercise is that I want to use
the 64 as a print sppooler for the Amiga (MPS-802 printer, C-64 serial 
connection only), and 'coz it's fun. Okay, I'm mad - but is there a better
reason?
 
	-Colin  *:^)

  --==**@@##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~##@@**==--
   colin@ultima.cs.uts.oz.edu  | "I'm happpy I live in a split level head"
   Colin Panisset              | 				-TMBG
   -Your friendly local madman |             *:^)
  --==**@@##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~##@@**==--

rick@tmiuv0.uucp (07/27/90)

In article <18116@ultima.cs.uts.oz>, colin@ultima.cs.uts.oz (Colin Panisset) writes:
> 	Q : I am attempting to connect an Amiga 2000 to a Commodore 64 via
> the parallel port on the Amiga, and the user port on the 64. My problem is this:
> apart from the eight data lines (D0-D7), there has to be (by reckoning) at least
> one handshaking line. The Amiga has ACK and STROBE, which look to be candidates,
> and the 64 has FLAG1 and PA2, which also look to be candidates. (FLAG1 can be
> used to generate an interrupt upon receipt of incoming signal, PA2 is bit 2
> of port 2). Which lines should be connected to each other? If anyone has had
> experience with this sort of problem, can they assist in any way?

Well, as a first pass, the STROBE signal from the Amiga (which is low true)
signals when a data byte is available at the parallel port.  In other words,
it's the Amiga saying "Here's a byte".  I'd hook that up to FLAG1 (possibly
through an inverter, if FLAG1 is high true).  The ACK signal on the Amiga
(again, low true) is used by the printer or whatever to tell the Amiga that
it has read the byte and that the Amiga should put up a new one.

From the Amiga's viewpoint, the data is first presented on the port, the 
STROBE* line goes low and stays low until the Amiga sees ACK* go low. STROBE*
is then released (goes high) and ACK* should also go high at that time.
According to the Centronics standard, the data must be valid 1 uS before
STROBE* goes valid, and the strobe must be valid for 1 uS minimum.  The data
must remain valid for 1 uS after STROBE* returns high.  Rough timing diagram
follows:

DATA:    ------------:                        :-----------
                     :________________________:

STROBE:  --------------------:        :-------------------
                             :________:

ACK:     ---------------------------: :-------------------
                                    :_:

I'm not a hardware guy anymore, so take this with a grain of salt.

> 	The reason for this somewhat bizzare exercise is that I want to use
> the 64 as a print sppooler for the Amiga (MPS-802 printer, C-64 serial 
> connection only), and 'coz it's fun. Okay, I'm mad - but is there a better
> reason?
>  
> 	-Colin  *:^)
> 
>   --==**@@##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~##@@**==--
>    colin@ultima.cs.uts.oz.edu  | "I'm happpy I live in a split level head"
>    Colin Panisset              | 				-TMBG
>    -Your friendly local madman |             *:^)
>   --==**@@##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~##@@**==--

I might suggest Thorazine 8-).  Actually, I have a spooler on my Amiga, but
it's all software (one of the many reasons to be thankful for multitasking).
----------------------------------------------------------------------------
[- O] Rick Stevens
  ?   EMail: uunet!zardoz!tmiuv0!rick -or- uunet!zardoz!xyclone!sysop
  V   CIS: 75006,1355 (75006.1355@compuserve.com from Internet)

"I'm tellin' ya, Valiant!  Da whole ting stinks like yesterday's diapers!"
                                - Baby Herman in "Who Framed Roger Rabbit"
----------------------------------------------------------------------------

leblanc@eecg.toronto.edu (Marcel LeBlanc) (07/28/90)

rick@tmiuv0.uucp writes:

>In article <18116@ultima.cs.uts.oz>, colin@ultima.cs.uts.oz (Colin Panisset) writes:
>> 	Q : I am attempting to connect an Amiga 2000 to a Commodore 64 via
>> the parallel port on the Amiga, and the user port on the 64. My problem is this:
>> apart from the eight data lines (D0-D7), there has to be (by reckoning) at least
>> one handshaking line. The Amiga has ACK and STROBE, which look to be candidates,
>> and the 64 has FLAG1 and PA2, which also look to be candidates. (FLAG1 can be
>> used to generate an interrupt upon receipt of incoming signal, PA2 is bit 2
>> of port 2). Which lines should be connected to each other? If anyone has had
>> experience with this sort of problem, can they assist in any way?

>Well, as a first pass, the STROBE signal from the Amiga (which is low true)
>signals when a data byte is available at the parallel port.  In other words,
>it's the Amiga saying "Here's a byte".  I'd hook that up to FLAG1 (possibly
>through an inverter, if FLAG1 is high true).  The ACK signal on the Amiga
>(again, low true) is used by the printer or whatever to tell the Amiga that
>it has read the byte and that the Amiga should put up a new one.

No inverters are needed.  Just connect these wires directly.  In fact I've
been using exactly this set-up for more than a year now.  I use this
parallel cable to transfer LOTS of files between the Amiga and C64.  It's
VERY convenient to develop software on an Amiga (where your editor and
assembler can both be resident), then transfer the binary to the C64 via the
parallel cable.  Since the FLAG* transitions in the C64 can generate NMIs,
the receive program on the C64 doesn't require 'starting-up' once it's
installed (it can be completely controlled from the Amiga through
interrupts).

If you have any specific problems, send me some mail - I'm sure I will have
already encountered them! :-)

>> 	The reason for this somewhat bizzare exercise is that I want to use
>> the 64 as a print sppooler for the Amiga (MPS-802 printer, C-64 serial 
>> connection only), and 'coz it's fun. Okay, I'm mad - but is there a better
>> reason?
>>
>>    colin@ultima.cs.uts.oz.edu  | "I'm happpy I live in a split level head"
>>    Colin Panisset              | 				-TMBG

Marcel A. LeBlanc  --  Electrical Engg Computer Group, Univ. of Toronto
-----------------------------------------------------------------------
leblanc@eecg.toronto.edu		else: uunet!utcsri!eecg!leblanc