[net.micro.amiga] Color Graphics Printer Driver for Seikosha

wayne@jtids.UUCP (Wayne Phillips) (07/08/86)

EAT THIS SUCKER!!!!

Has anyone seen or know anything about a printer driver for the
Seikosha GP700A color printer!! (originally used with the TI-99 computer)

Also if anyone could supply information about how one goes about
writing a color graphics printer driver (eg. how to interface to the
workbench screen dumper), this would be appreciated also.

Please mail responses to       phillips@nadc             Arpanet
                               ...!burdvax!jtids!wayne   Usenet

carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner) (07/10/86)

In article <138@jtids.UUCP> wayne@jtids.UUCP (Wayne Phillips) writes:
>
>Also if anyone could supply information about how one goes about
>writing a color graphics printer driver (eg. how to interface to the
>workbench screen dumper), this would be appreciated also.

   Rom Kernal manual (our Vol. 2, don't know which Addison-Wesley volume)
contains assembler and C source for 4 or 5 printer drivers including
two color printers (Okimate and Diablo C-150 color ink jet printer).
The render.c portion of a driver is the routine that gets called by
the printer device's dumprport routine when the dump command is sent
to the device.  Read the printer device chapter in the RKM also.
Using the Diablo driver as an example, Render(ct, x, y, status) does
five different functions according to the status.

   If status is 0, render allocates its buffer.  Status 3 tells render
to clear the buffer, status 4 is for freeing the buffer. 
If status is 1, dumprport is passing pixel info.  Dumprport repeatedly
calls render until it has passed enough pixel info for one pass of
that printer's head.  It passes the pixel info as color, xpos, ypos.
Render is responsible for taking this info and building a buffer
in the correct format for feeding it to its printer.  When enough info
for one pass of the head has been sent, dumprport calls render with
status = 2, signaling render to dump its buffer to the printer.

   I am attaching the source for Wait.asm which I believe is missing from
the driver source in the manual.


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

**********************************************************************
*
*	wait
*
**********************************************************************

	SECTION		printer

*------ Included Files -----------------------------------------------

	INCLUDE		"exec/types.i"
	INCLUDE		"exec/ports.i"
	INCLUDE		"exec/devices.i"
	INCLUDE		"exec/io.i"

	INCLUDE		"devices/timer.i"
	INCLUDE		"devices/prtbase.i"

	INCLUDE		"macros.i"


*------ Imported Names -----------------------------------------------

*------ Imported Functions -------------------------------------------

	XREF_EXE	Forbid
	XREF_EXE	Permit
	XREF_EXE	WaitIO
	XREF		_SysBase

	XREF		_PD


*------ Exported Functions -------------------------------------------

	XDEF		_PWait


*------ printer.device/PWait -----------------------------------------
*
*   NAME
*	PWait - wait for a time
*
*   SYNOPSIS
*	PWait(seconds, microseconds);
*
*   FUNCTION
*	PWait uses the timer device to wait after writes are complete
*
*---------------------------------------------------------------------
_PWait:
		MOVEM.L	A4/A6,-(A7)
		MOVE.L	_PD,A4
		MOVE.L	pd_PBothReady(A4),A0
		JSR	(A0)
		TST.L	D0
		BNE.S	error

		LEA	pd_TIOR(A4),A1
		MOVE.W	#TR_ADDREQUEST,IO_COMMAND(A1)
		MOVE.L	12(A7),IOTV_TIME+TV_SECS(A1)
		MOVE.L	16(A7),IOTV_TIME+TV_MICRO(A1)
		CLR.B	IO_FLAGS(A1)
		MOVE.L	IO_DEVICE(A1),A6
		JSR	DEV_BEGINIO(A6)
		LINKEXE	Forbid
		LEA	pd_TIOR(A4),A1
		LINKEXE	WaitIO
		LINKEXE	Permit
		MOVEQ	#0,D0
		TST.L	D0
error:
		MOVEM.L	(A7)+,A4/A6
		RTS

		END



-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CBM   >>Amiga Technical Support<<
                     UUCP  ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=