drtiller@uokmax.uucp (Donald Richard Tillery Jr) (07/20/90)
Posted for Eric McVicker:
Dave,
I have a problem with QBSBlit(). The problem is it doesn't work!
I'm not sure about the bltnode structure or my C function it calls.
In the RKMs it has bltnode defined as...
struct bltnode {
struct bltnode *Next,
int (*function)(),
char stat,
char beamsync,
short blitsize,
int (*(cleanup)() };
I have it set up in my program as...
struct bltnode *MyBlitNode = {
NULL, /* no other links */
&BlitScroll, /* my function */
0, /* no cleanup */
189, /* the scan line to cause the interrupt */
0, /* DAVE, DOES BLITSIZE NEED TO BE SPECIFIED,
AND IF SO HOW DO I FIND IT? */
NULL }; /* no cleanup function to call.
DAVE, DO YOU NEED TO SPECIFY A CLEANUP
FUNCTION EVEN IF YOU DONT NEED ONE */
The function I use for the interrupt is simple...
int BlitScroll()
{
...
BlitBitMapRastPort(SourceBitMap, SourceX, SourceY, DestRastPort, DestX,
DestY, SizeX, SizeY, mask);
return(0);
}
Thats not the exact function but thats all that uses the blitter. I return 0
because QBSBlit() says I must have a RTS at the end of my function and return 0
to show I'm done with the blitter.
If I use the function without trying to use QBSBlit() it works fine, but I get
screen flash, which is why I'm hassling with this.
When I use QBSBlit() it locks-up when I call QBSBlit().
So, what I'm asking is, is this function format legal? Do I need to know
blitsize? Or anything else you can tell me.
If you would like to post a code sample to explain the solution that would be
fine. I would appreciate any help I can get on this.
In case you need to know I'm using Manx C 3.6a.
Thanks,
Eric McVicker
Gigabyte Programming
Any info for him can be addressed to me. Thanx.
Rick Tillery
millerjv@rigel.crd.ge.com (Jim V Miller) (07/20/90)
In article <1990Jul19.213606.23011@uokmax.uucp> drtiller@uokmax.uucp (Donald Richard Tillery Jr) writes:
From: drtiller@uokmax.uucp (Donald Richard Tillery Jr)
I have a problem with QBSBlit(). The problem is it doesn't work!
I'm not sure about the bltnode structure or my C function it calls.
In the RKMs it has bltnode defined as...
struct bltnode {
struct bltnode *Next,
int (*function)(),
char stat,
char beamsync,
short blitsize,
int (*(cleanup)() };
I have it set up in my program as...
struct bltnode *MyBlitNode = {
NULL, /* no other links */
&BlitScroll, /* my function */
0, /* no cleanup */
189, /* the scan line to cause the interrupt */
0, /* DAVE, DOES BLITSIZE NEED TO BE SPECIFIED,
AND IF SO HOW DO I FIND IT? */
NULL }; /* no cleanup function to call.
DAVE, DO YOU NEED TO SPECIFY A CLEANUP
FUNCTION EVEN IF YOU DONT NEED ONE */
Rick Tillery
I don't know anything about programming the blitter, but whenever I use a pointer
to a function I merely specify the function name - no trailing (), no leading
apersand. I just checked my syntax on some code I just wrote (on a workstation,
not on an Amiga so the this may be how your C compiler does it). Anyway I would try
replacing the "&BlitScroll" with just a "BlitScroll" in the function field of the
bltnode.
--
Jimmy Miller
General Electric Corporate Research and Developement: millerjv@crd.ge.com
Rensselaer Design Research Center (RPI): jvmiller@rdrc.rpi.edu
"All I need is room to play."
daveh@cbmvax.commodore.com (Dave Haynie) (07/20/90)
In article <1990Jul19.213606.23011@uokmax.uucp> drtiller@uokmax.uucp (Donald Richard Tillery Jr) writes: >Dave, I have a problem with QBSBlit(). Unfortunately, Dave does NOT know blitter.... -- Dave Haynie Commodore-Amiga (Amiga 3000) "The Crew That Never Rests" {uunet|pyramid|rutgers}!cbmvax!daveh PLINK: hazy BIX: hazy "I have been given the freedom to do as I see fit" -REM
mlschroe@medusa.informatik.uni-erlangen.de (Michael Schroeder) (07/23/90)
drtiller@uokmax.uucp (Donald Richard Tillery Jr) writes: >Posted for Eric McVicker: >I have a problem with QBSBlit(). The problem is it doesn't work! > I think this is a bug in the OS! The QBSBlit routine checks if GFXBase->beam (?) is zero. If this is true, it JUST CALLS QBlit() !!! Unfortunatelly, GFXBase->beam is reset to zero at every TOF Interrupt. My (ugly) solution (work around) is to busy wait for the beam position and then using QSBlit(). Hope that helps, Michael