Example Of Osd Working ?


rixed

Member
Joined
Dec 31, 2005
Messages
206
Age
48
Location
Paris (fr)
Website
happyleptic.org
Hi!

Im still working at my 3d renderer.
I have changed from rendering to RGB layer to rendering into YUV region, which looks far better when lighting is on.

I now want to use the OSD to display various statisticall datas, but I can't have it to display anything.

Ive enabled it in register #2880, the I poked the address of my single region's header structure into both odd and even registers,
but nothing is displayed. Here is the code enabling the OSD :

Code:
// set address of OSD headers
uint32_t osd_head = (uint32_t)&shared->osd_head;
gp2x_regs16[0x2916>>1] = osd_head&0xffff;
gp2x_regs16[0x2918>>1] = osd_head>>16;
gp2x_regs16[0x291a>>1] = osd_head&0xffff;
gp2x_regs16[0x291c>>1] = osd_head>>16;
// set osd palette
gp2x_regs16[0x2954>>1] = 0;
gp2x_regs16[0x2956>>1] = 0;   // color 0 (should not be set)
gp2x_regs16[0x2956>>1] = 0;
gp2x_regs16[0x2956>>1] = 0xffff; // color 1
gp2x_regs16[0x2956>>1] = 0xffff;
gp2x_regs16[0x2956>>1] = 0xffff; // color 2
gp2x_regs16[0x2956>>1] = 0xffff;
gp2x_regs16[0x2956>>1] = 0xffff; // color 3
gp2x_regs16[0x2956>>1] = 0xffff;
// enable OSD
gp2x_regs16[0x2880>>1] |= 0x80;

So, Im looking for a working example. I had a look into rlyeh's minilib but found nothing usefull (and the OSD code in there is fully commented, so I suppose it's not working neither yet).

Anybody knows of a programm which uses the hardware OSD ?
 
Back
Top