Needed to avoid use of RastPort or BitMap:

userdata	- for whatever the app wants passed back to it
maxcols		- pixel width of source
maxrows		- pixel height of source
resolution.x/y	- like DisplayInfoData aspect values

depth		- shouldn't need


cdumprport.c:
-------------
4:*	PRD_DUMPRPORT -- dump the specified RastPort to a graphics printer
7:*	Print a rendition of the supplied RastPort, using the supplied
15:*	io_RastPort	ptr to a RastPort.
32:*	io_SrcX		x offset into the RastPort to start printing from.
33:*	io_SrcY		y offset into the RastPort to start printing from.
34:*	io_SrcWidth	width of the RastPort to print (from io_SrcX).
35:*	io_SrcHeight	height of the RastPort to print (from io_SrcY).
92:*	There following rules for the interpretation of io_DestRows and
278:*     b) struct IODRPReq    a dumprport i/o request
791:	struct RastPort *rp;
922:	PInfo.pi_rp = rp = ior->io_RastPort;
937:	kprintf("RastPort=%08lx, ColorMap=%08lx, Modes=%04lx, Special=%04lx, PrefsFlags=%04lx\n",
938:		rp, ior->io_ColorMap, ior->io_Modes, special, PInfo.pi_PrefsFlags);
1125:	if (layer = rp->Layer) { /* if doing a layer */
1126:		if (layer->SuperBitMap) { /* SuperBitMap ? */
1127:			maxcols = layer->SuperBitMap->BytesPerRow * 8;
1128:			maxrows = layer->SuperBitMap->Rows;
1131:				maxcols = GetBitMapAttr(layer->SuperBitMap,BMA_WIDTH);
1132:				maxrows = GetBitMapAttr(layer->SuperBitMap,BMA_HEIGHT);
1143:		maxcols = rp->BitMap->BytesPerRow * 8;
1144:		maxrows = rp->BitMap->Rows;
1147:			maxcols = GetBitMapAttr(rp->BitMap,BMA_WIDTH);
1148:			maxrows = GetBitMapAttr(rp->BitMap,BMA_HEIGHT);
1641:	depth = rp->BitMap->Depth;
1644:		depth = GetBitMapAttr(rp->BitMap,BMA_DEPTH);
1656:	/* see if any of the original rp's planes are in fast mem */
1658:		if ((TypeOfMem(rp->BitMap->Planes[loop]) & MEMF_CHIP) != MEMF_CHIP) {
1666:	/* if not using blitter and this rp has a layer */
1682:		if ((PInfo.pi_temprp = AllocMem(sizeof(struct RastPort), MEMF_PUBLIC))
1685:			kprintf("couldn't get %ld bytes for rp\n",
1686:				sizeof(struct RastPort));
1691:		kprintf("depth=%ld, got %ld bytes for rp @ %lx-%lx\n",
1692:			depth, sizeof(struct RastPort), PInfo.pi_temprp,
1693:			sizeof(struct RastPort) + (UBYTE *)PInfo.pi_temprp - 1);
1695:		*(PInfo.pi_temprp) = *rp; /* copy rp */
1697:		PInfo.pi_temprp->Mask = 0xff;
1698:		PInfo.pi_temprp->BitMap = NULL; /* havnt got this yet */
1699:		PInfo.pi_temprp->Layer = NULL; /* no layers for this rp */
1701:		temp1 = sizeof(struct BitMap) + depth * sizeof(PLANEPTR);
1703:		if ((PInfo.pi_temprp->BitMap = AllocMem(temp1, MEMF_PUBLIC)) ==
1713:			temp1, PInfo.pi_temprp->BitMap,
1714:			temp1 + (UBYTE *)PInfo.pi_temprp->BitMap - 1);
1716:		*(PInfo.pi_temprp->BitMap) = *(rp->BitMap); /* copy rp bitmap */
1718:		PInfo.pi_temprp->BitMap->Planes[0] = NULL;
1720:		PInfo.pi_temprp->BitMap->Rows = 1;
1723:			so make sure that the temprp is big enough for either.
1728:		PInfo.pi_temprp->BitMap->BytesPerRow = temp1;
1730:		if ((PInfo.pi_temprp->BitMap->Planes[0] = AllocMem(temp2, MEMF_CHIP))
1739:			temp2, PInfo.pi_temprp->BitMap->Planes[0],
1740:			temp2 + (UBYTE *)PInfo.pi_temprp->BitMap->Planes[0] - 1);
1744:			PInfo.pi_temprp->BitMap->Planes[loop] =
1745:				PInfo.pi_temprp->BitMap->Planes[loop - 1] + temp1;
1748:				loop, PInfo.pi_temprp->BitMap->Planes[loop],
1749:				temp1 + PInfo.pi_temprp->BitMap->Planes[loop] - 1);
1766:	else temp1 = 1 << rp->BitMap->Depth;	/* get # of colors in palette */
1769:		temp1 = 1 << GetBitMapAttr(rp->BitMap,BMA_DEPTH);


error.c:
--------
26:	struct RastPort *rp;
27:	struct BitMap *bm;
52:	if ((rp = PInfo->pi_temprp) != NULL) { /* if we allocated this */
53:		if ((bm = rp->BitMap) != NULL) { /* if we allocated this */
63:				sizeof(struct BitMap) + bm->Depth * sizeof(PLANEPTR), bm);
65:			FreeMem(bm, sizeof(struct BitMap) + bm->Depth * sizeof(PLANEPTR));
68:		kprintf("BO: freeing %ld bytes for rp @ %lx\n",
69:			sizeof(struct RastPort), rp);
71:		FreeMem(rp, sizeof(struct RastPort));

fixcolors.c:
------------
23:	B15 is a combination of M15/C15.  However, this leads to a purple
46:			1 << PInfo->pi_rp->BitMap->Depth);
50:			1 << PInfo->pi_rp->BitMap->Depth);


mrp.c:
------
20:/* in rpa.asm - jumps to pi_getcolorint */
36:	struct RastPort *rp;
54:		rp = PInfo->pi_rp;
61:	kprintf("mrp: calling colorfunc(1)\n");
67:			else if ((*buf = ReadPixel(rp, y, x--)) < 0) {
76:			rp = PInfo->pi_rp;
83:	kprintf("mrp: calling colorfunc(2)\n");
89:				else if ((*buf = ReadPixel(rp, x++, y)) < 0) {
96:			rp = PInfo->pi_rp;
103:		"rp=%lx, x=%ld, y=%ld, width=%ld, buf=%lx, temprp=%lx, flags=%lx\n",
104:		rp, x, y, width, buf, PInfo->pi_temprp, PInfo->pi_flags & PRT_NOBLIT);
109:	kprintf("mrp: calling colorfunc(3)\n");
114:				else ReadPixelLine(rp, x, y, width, buf, PInfo->pi_temprp,
122:			rp = PInfo->pi_rp;
127:				if (*buf != ReadPixel(rp, x, y)) {
129:						x, *buf, ReadPixel(rp, x, y));
131:					width = rp->BitMap->Depth - 1;
135:							width, rp->BitMap->Planes[width]);
142:						kprintf("%04ld ", ReadPixel(rp, x++, y));

pixel.c:
--------
34:	struct RastPort *rp;
48:	rp = PInfo->pi_rp;
58:	if(rp->BitMap->Depth <= 6)
100:			ReadPixelLine(PInfo->pi_rp, 0, y, xend, HamBuf, PInfo->pi_temprp,
246:	if(PInfo->pi_rp->BitMap->Depth <= 6)



rpa.asm:
--------
61:	xdef _rp2rp
84:*		through to another x,y location within a certain RastPort.
87:*     count = ReadPixelArray(rp,xstart,ystart,xstop,ystop,array,temprp,noblit)
91:*	struct	RastPort *rp;
95:*	struct	RastPort *temprp;
99:*		of the bit-planes used to describe a particular RastPort into the pen
104:*       rp -  pointer to a RastPort structure
105:*       (xstart,ystart) starting point in the RastPort
106:*       (xstop,ystop) stopping point in the RastPort
108:*		temprp - temporary rastport (copy of rp with Layer set == NULL,
109:*									temporary memory allocated for temp BitMap
110:*									temprp->BitMap with Rows set == 1,
114:*									temprp->BitMap->Planes[])
141:	move.l  24(sp),a0			; rp
144:	movea.l	48(sp),a1			; temprp
167:	movea.l	a1,a4		; protect temprp pointer -- does not modify cc
171:	bra.s	rpxaloop_count
173:rpxaloop_start:
175:	movea.l	a3,a0		; rp
180:	movea.l	a4,a1		; temprp
189:rpxaloop_count:
191:	dbra	d3,rpxaloop_start
193:rpxaloop_end:
213:*       count = ReadPixelLine(rp,xstart,ystart,width,array,temprp,noblit)
217:*	struct	RastPort *rp;
221:*	struct	RastPort *temprp;
225:*	of the bit-planes used to describe a particular RastPort into the pen
230:*       rp -  pointer to a RastPort structure
231:*       (x,y) a point in the RastPort
234:*		temprp - temporary rastport (copy of rp with Layer set == NULL,
236:*					 temprp->BitMap with Rows set == 1,
238:*					 temprp->BitMap->Planes[])
258:	move.l  24(sp),a0		; rp
261:	movea.l	44(sp),a1		; temprp
277:	bsr	rp2rp				; 68000 clipblit (sort of).
283:	movem.l	d0/d1/a0/a1,-(sp)	; save xstart, ystart, rp, temprp
284:	movea.l	rp_BitMap(a1),a1	; get BitMap ptr in a1
294:	movem.l	(sp)+,d0/d1/a0/a1	; restore xstart, ystart, rp, temprp
299:					; rp, temprp in a0, a1
303:	moveq.l	#0,d2			; copy to temprp(0,0)
305:	move.l	a1,-(sp)		; save temprp
306:	jsr	_LVOClipBlit(a6)	; copy rp to temprp the easy/quick way
308:	move.l	(sp)+,a1		; restore temprp
312:; a1 - temprp
316:	movea.l	rp_BitMap(a1),a1	; get BitMap ptr
494:; rp2rp( xstart, ystart, width, rp1, rp2 )
497:; Transfer width pixels at xstart,ystart from rp1 to position 0,0 in rp2.
500:_rp2rp:
503:		bsr.s	rp2rp
507:rp2rp:
509:		movea.l	rp_Layer(a0),a2
515:		movea.l	rp_BitMap(a0),a0	a0=source bitmap
524:		movea.l	rp_BitMap(a1),a1
530:; main loop for each plane, transfer bytes to the destination rastport (rp2)
