ts-7000
[Top] [All Lists]

Re: [ts-7000] Frame Buffer Programming ?

To:
Subject: Re: [ts-7000] Frame Buffer Programming ?
From: Matthew Saint <>
Date: Fri, 4 Aug 2006 13:28:12 +0000 (GMT)
Hi,
 
thanks - i belive the short is 2bytes in this case the reason being the TS-7KV video board has 16 bits per pixel with a 640x480 display so either;
 
sizeof(unsigend short) * 640 * 480
 
or
 
2 * 640 * 480
 
should equate to the same in this case.
 
Im now wondering if the mapping base address is correct for the card jumpers, the manual is unclear.
 
Matt
 


 
----- Original Message ----
From: Christopher Friedt <>
To:
Sent: Friday, 4 August, 2006 1:34:36 PM
Subject: Re: [ts-7000] Frame Buffer Programming ?

Hi,

I'm just assuming that the size of an unsigned short is _not_ one byte
on your board. It's most likely 2.

If so, you should insert sizeof(unsigned short) to actually specify to
the compiler that you want 640*480*2 * _2_ bytes instead of only
640*480*2 bytes.

fb = (unsigned short *)mmap(0, sizeof(unsigned short)*640 * 480 * 2,
PROT_READ|PROT_ WRITE, MAP_SHARED, fd, 0x72200000);

The sizeof an unsigned short should represent the bit-depth of the
framebuffer you are using.

Cheers,

~/Chris

mattsaintdev wrote:
> Hi,
>
> as a newbie ive been trying my TS-7200 using cygwin on my pc to
> compile helloworld ok.
>
> Ive got the Video card too and would like to make some use of it but
> im stuck. The TS support helped me by sending the bitblt.c source
> code that mmaps the fb and has a bitblt() function.
>
> However, if i compile it i get nothing - well i do see the login
> prompt still.
>
> I assume that the frame buffer is a (640x480) * 2 byte buffer and
> that code can simply write and read once mapped?
>
> If so why wont ;
>
> int fd = open("/dev/mem" , O_RDWR|O_SYNC) ;
>
> regs = (unsigned short *)mmap(0, 4096,PROT_READ| PROT_WRITE,
> MAP_SHARED, fd, 0x72000000);
>
> fb = (unsigned short *)mmap(0, 640 * 480 * 2, PROT_READ|PROT_ WRITE,
> MAP_SHARED, fd, 0x72200000);
>
> allow me access?
>
> And wheres all the other 7592KB gone i.e wont this be linear video
> space?
>
> All help appreciated,
>
>
> Matt
>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>


__._,_.___


SPONSORED LINKS
Linux os Hardware Arms
Computer internet Computer security


YAHOO! GROUPS LINKS

  •  Visit your group "ts-7000" on the web.
     
  •  To unsubscribe from this group, send an email to:
     =Unsubscribe
     
  •  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



__,_._,___
<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