This site is no longer active and is available for archival purposes only. Registration and login is disabled.

GAPI drawing problem


GAPI drawing problem

Postby CharlyV » Dec 17, 2002 @ 5:14pm

We need your help to solve our GAPI drawing problem for the coming AtariST emulator called " CastCE " !

here a part from the code :

register unsigned short *line_o = (unsigned short *)(GXBeginDraw_()+(320*gapiypitch+row*gapixpitch));
register unsigned int *line_i = (unsigned int *)(((unsigned char *)membase)+vid_adr);
for (col=0; col<20; col++) {
*line_o = color[((r4>>12)&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[((r3>>12)&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[((r2>>12)&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[((r0>>12)&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[((r4>>8)&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[((r3>>8)&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[((r2>>8)&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[((r0>>8)&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[((r4>>4)&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[((r3>>4)&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[((r2>>4)&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[((r0>>4)&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[(r4&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[(r3&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[(r2&15)];
(unsigned char*)line_o-=gapiypitch;
*line_o = color[(r0&15)];
(unsigned char*)line_o-=gapiypitch;
}
GXEndDraw_();


the source buffer is a 320*200 4 bit color (16 color), the palette is precalculate in Color[16] which is define as array of short

Normaly this piece of code would draw a line (320 pixel) , that's draw a totally green line in 3850 and in 3760 that's draw a green monochrome line , without gapi that draw a line with good color.

are the Gapiypitch and Gapixpitch are well used?

Thanks in advance ...

CharlyV, on behalf of schtruck
CharlyV
pm Member
 
Posts: 22
Joined: Dec 12, 2002 @ 10:18am


Postby Dan East » Dec 17, 2002 @ 9:28pm

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Digby » Dec 18, 2002 @ 1:01am

Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Postby schtruck » Dec 18, 2002 @ 8:39am

ok to explain more, i would like to take my horizontal line from my memory buffer (a line from the ST video screen buffer) which is 320 pixel witdh and copy it to handled screen in lanscape mode.
in fact i would like to make a standard routine using Gapi which will be certainly slower than my direct video access routine for IPAQ but surely compatible with many PPC.
schtruck
pm Member
 
Posts: 77
Joined: May 24, 2002 @ 5:29pm


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron