ts-7000
[Top] [All Lists]

[ts-7000] Re: Frame Buffer Programming ?

To:
Subject: [ts-7000] Re: Frame Buffer Programming ?
From: "gamehoser" <>
Date: Tue, 05 Dec 2006 02:17:15 -0000
Ok, I finally found my bug.  I was off by 1 in a shift left that
computed the bit blit destinations.  This caused me to have the
incorrect idea about which page I was seeing when I was writing
straight to the framebuffer.  It's all good now.  Thanks again Pete!


--- In  "PeterElliot" <> wrote:
>
> --- In  "gamehoser" <james.singer1@> wrote:
> >
> > Alright, using this I whipped a quick test and I'm still having
> > trouble making it behave in a predictable fashion.  The bus page
> > select bits seem to control what page is visible as I would expect
> > when the raster page bits are all 0, but when I set any of the 
> raster
> > bits, it seems to ALSO affect what page is visible and I end up 
> seeing
> > noise.  Is there anywhere I can get a quick look at a double 
> buffering
> > sample that works properly?
> > 
> 
> I use a macro define:
> 
> #define SetDispBufNums(x,y) (0x300 |(x<<3) | y)
> 
> Then I use:
> 
> VGAregs[_vVIDCTRL] = SetDispBufNums(1,2);
> 
> This selects screen 1 to view and 2 to edit (or was it the other way 
> round;)
> 
> Swapping the 1 and 2 will toggle displays. The values are 0..7.
> 
> main(){
> int i;
> volatile unsigned short *VGAregs;  // VGA Registers   16 Bit
> volatile unsigned short *fb;       // Screen buffer   16 Bit
> 
> /*--Map VGAregs-----------*/
> VGAregs = (unsigned short *)mmap(0, 4096, PROT_READ|PROT_WRITE, 
> MAP_SHARED, mem_fd, 0x72000000);
> if (VGAregs == MAP_FAILED) { perror("mmap1:"); return 0; }
> VGAregs += (0x30/sizeof(unsigned short));
> 
> /*--Map Framebuffer-----------*/
> fb = (unsigned short *)mmap(0, _scrW*_scrH*2, PROT_READ|PROT_WRITE, 
> MAP_SHARED, mem_fd, 0x72200000);
> if (fb == MAP_FAILED) { perror("mmap2:"); return 0; }
> 
> VGAregs[_vVIDCTRL] = SetDispBufNums(1,2);
> for (i=0; i<(640*480); i++) fb[i]=0xF800; // Fill Red
> sleep(1);
> VGAregs[_vVIDCTRL] = SetDispBufNums(2,1); // Display Red
> for (i=0; i<(640*480); i++) fb[i]=0x07C0; // Fill Green
> sleep(1);
> VGAregs[_vVIDCTRL] = SetDispBufNums(1,2); // Display Green
> sleep(1);
> VGAregs[_vVIDCTRL] = SetDispBufNums(2,1); // Display Red
> sleep(1);
> VGAregs[_vVIDCTRL] = SetDispBufNums(1,2); // Display Green
> }
> 
> I don't have my TS-7300 with me to test it...
> 
> Hope this helps.
> 
> PJE
>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU