View Single Post
Old 08-27-2012, 04:32 AM   #2
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
EDIT: Err no. my bad.
Spoiler:
see GM Video driver. add ordered dither and you're there

EDIT: Okay I had a quick look again, in essence pure black draws much quicker as you have identified, so here we avoid grays.


I just ripped out the relevant method: (this is 8bit K5 one, but w/e)

I have mercilessly ripped out bits to demo what you are talking about
PHP Code:
void gmplay8() {

//check out the original code but...
in essence we are defining what we are to draw inside
to what depth etc... (FBSIZE IS #define FBSIZE (600/8*800))
Also we have to tell it the exact types etc..
u32 __invalid_size_argument_for_IOC// ioctl.h bug fix for tcc

    
u32 i,x,y,b,fbsize=FBSIZEu8 fbt[FBSIZE];

// Read it in...

    
while (fread(fbt,fbsize,1,stdin)) { 

// Sync code elided.... sufficed to say it can drop frames...
 

//So jump every 8 lines...
        
for (y=0;y<800;y++) for (x=0;x<600;x+=8) {

do 
order bit dither over 100 passes 8 pixels apart

            b
=fbt[600/8*y+x/8]; i=y*fs+x;
            
fb0[i]=(b&1)*255b>>=1fb0[i+1]=(b&1)*255b>>=1;
            
fb0[i+2]=(b&1)*255b>>=1fb0[i+3]=(b&1)*255b>>=1;
            
fb0[i+4]=(b&1)*255b>>=1fb0[i+5]=(b&1)*255b>>=1;
            
fb0[i+6]=(b&1)*255b>>=1fb0[i+7]=(b&1)*255;

// Update the frame count and pass an update enum to the lib...

        
fc++; gmlib(GMLIB_UPDATE);
    }

// Etc..

More full details and someone who knows what they are talking about on this thread:
HTH

https://www.mobileread.com/forums/sho...d.php?t=177455

Last edited by twobob; 08-29-2012 at 05:32 AM. Reason: added notes - formatting
twobob is offline   Reply With Quote