I'm just trying to replicate a sprite down the screen (every 10 lines) using the copper and its not working.
Not sure what i'm doing wrong, but i wasted my whole Saturday getting nowhere...
anyway the sprite is 7 pixels high.
given this documentation here, how does a sprite ever move beyond position 512 in either direction? I'm understanding that SPRxPOS contains 8 bits of x and y and SPRxCTL contains one more x and y position bit, so 2^9 = 512.
thanks
nate
http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node003F.htmlvoid loadCopper(struct Screen *screen,
struct Window *window)
{
register USHORT i;
struct ViewPort *viewPort;
struct TagItem uCopTags[] =
{
{ VTAG_USERCLIP_SET, NULL },
{ VTAG_END_CM, NULL }
};
CINIT(uCopList, 21);
CWAIT(uCopList, 0, 0);
/* sprites 4-8 to appear behind the playfield */
CMOVE(uCopList, custom.bplcon2, 0x10);
for(i = 1; i <= 20; i++)
{
CWAIT(uCopList, i * 10, 0);
CMOVE(uCopList, custom.spr[4].pos,(( i * 10 + 1) <<
| 100);
CMOVE(uCopList, custom.spr[4].ctl, (i * 10 +
<<
;
}
CEND(uCopList);
viewPort = ViewPortAddress(window);
Forbid();
viewPort->UCopIns=uCopList;
Permit();
(VOID) VideoControl( viewPort->ColorMap, uCopTags );
RethinkDisplay();
}