/********************************************************************
 ** PARALLEL PORT SUPPORT (PACKET DRIVER)
 **
 ** (c) Spak, Darrell Tam, c9107253@ee.newcastle.edu.au (1994)
 ** phone (Australia) 049-829-710
 **                    49-829-710
 ** (c) SST 1994
 **
 ** GLOBALS
 **
 ** TABS to 4
 ********************************************************************/

#include "packets.h"

/** STUFF WE NEED */
struct	IntuitionBase *IntuitionBase = NULL;
struct	GfxBase *GfxBase = NULL;
struct	Library *TimerBase = (void *)-1;
long	in, out;


/** GENERAL MEMORY NEEDED */
struct Remember *mem = NULL;


/** HASH TABLE FOR DMA WRITE THINGS */
struct PktMsg *DMARecvHash[HASH_TABLE_SIZE*2];

/** NUMBER of SERVICES (clients) - ALWAYS USE THE MACROS */
struct MsgPort *ServicePort[MAXSERVICES];


/** MESSAGE PORTS */
struct	MsgPort
	*comport = NULL,			/* communications port for packets */
	*regport = NULL,			/* resgistration port for adding clients */
	*eatport = NULL;			/* thigs that need to be eaten! */

/** STUFF FOR THE TIMERS */
struct MsgPort
	*timersysport = NULL;
struct timerequest
	*timedelayio = NULL,
	*timersysio = NULL,
	*timerintio = NULL;
struct MsgInterrupt
	*timermi = NULL;

/* structure passed on to the interrupt (see _CIAIntRotuine par.s) */
struct CIRInt cir;



/** CIA RESOURCE STUFF */
struct	Interrupt *ciaint, *oldciaint = NULL;
short	ciasignal = -1, pad0;



/** PACKET ATTRIBUTE TYPE STUFF */
short	maxpktlen = MAXPKTLEN;
short	maxretries = MAXRETRIES;
long	timeoutsecs = TIMEOUTSECS;
long	timeoutmicros = TIMEOUTMICROS;


/** ERRO COUNTS */
long	chksumerrs = 0;
long	timeouterrs = 0;

