Re: 8 to 18 look up




>>
>> 2) My mouse cursor is so big and skewed.
>>

It looks like your cursor painting is still in 16bpp
while the rest stuff migrated to 8bpp.



80.rishi@xxxxxxxxx wrote:
Thanks voidcoder.
Bpp = 3.

I think I just got it. There is a 'if' statement in DispSetPalette()
which is preventing from palette ram update. I modified that and
display looks ok now.

But Im getting new 2 new issues

1) The title bar of the popup that I get once explorer starts is
discolored. Even the text looks faded. But rest of the display and
icons are proper.

2) My mouse cursor is so big and skewed.

Advise me on these issues.

voidcoder wrote:
>> p_LCDRegs->LCCR3 = (LCD_PCD(PCD) | LCD_BPP(BPP) |
>>

What is value of "BPP" at this point?



80.rishi@xxxxxxxxx wrote:
Thanks a ton for your reply.

Mainstone II BSP. I chose display type LTM035A776C because only this
showed sth in the display earlier but with color problems. After which
I learnt my board is hardwired for 18 bpp. Went for 8 to 18 bpp lookup.

Here is the code. Have given here the code break from diff. parts.

file Dispdrv.c
---------------------

DispDrvrInitialize()
{
BPP = 8;
XllpLCD.PixelDataFormat = PDFOR_11;
}

DispDrvrSetPalette()
{
// v_pPaletteBuffer->palette[i] = unsigned long

v_pPaletteBuffer->palette[i] = (
((DWORD)(source[i].peBlue>>2) <<2 ) |
((DWORD)(source[i].peGreen >> 2) << 10) |
((DWORD)(source[i].peRed >> 2) << 18)
);
}

typedef struct
{
unsigned long palette[256];
}LCD_PALETTE;

volatile LCD_PALETTE * v_pPaletteBuffer = NULL;

v_pPaletteBuffer = (volatile LCD_PALETTE
*)(PALETTE_BUFFER_BASE_VIRTUAL);


File xllp_lcd.c
--------------------
LCDInitController()
{

case BPP_8:
//pXllpLCD->PaletteSize = 512;
pXllpLCD->PaletteSize = 1024;
break;


// Configured for 640*480, pixel clock = 25 Mhz, Vsync = 65 Hz

p_LCDRegs->LCCR0 = (LCD_LDM | LCD_SFM | LCD_IUM | LCD_EFM | LCD_PAS |
LCD_QDM | LCD_BM | LCD_OUM | LCD_RDSTM | LCD_CMDIM | LCD_OUC |
LCD_LDDALT);

p_LCDRegs->LCCR1 = (LCD_PPL(0x27FU) | LCD_HSW(0x3F) | LCD_ELW(0x0F) |
LCD_BLW(0x2fU) );

p_LCDRegs->LCCR2 = (LCD_LPP(0x1df) | LCD_VSW(0x01) | LCD_EFW(0x0B) |
LCD_BFW(0x1F) );

p_LCDRegs->LCCR3 = (LCD_PCD(PCD) | LCD_BPP(BPP) |
LCD_PDFOR(pXllpLCD->PixelDataFormat));

p_LCDRegs->LCCR4 = LCD_PAL_FOR(2);
}

Requet you to help me out. I checked and DispDrvrSetPalette is getting
called.

-Rishi

voidcoder wrote:
Post some code. How do you configure the LCD controller,
how do you load the palette etc.


80.rishi@xxxxxxxxx wrote:
Guys

Mainstone II, PB 5.0.

I have read all the articles to implement 8 to 18 lookup. I think I
have made the necessary changes.
When I load the image my display is pitch black and no color, no text.

Am I missing something out. How do I use the default palette given in
syspal.h. Do I have to do anything.

Thanks in advance

-Rishi


.



Relevant Pages

  • Re: 8 to 18 look up
    ... >>Should I make all USHORTs in cursor functions to UCHAR? ... display looks ok now. ... What is value of "BPP" at this point? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: 8 to 18 look up
    ... showed sth in the display earlier but with color problems. ... I learnt my board is hardwired for 18 bpp. ... DispDrvrSetPalette() ... Mainstone II, PB 5.0. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: 8 to 18 look up
    ... Now I have only single cursor. ... UCHAR * ptrLine; ... display looks ok now. ... What is value of "BPP" at this point? ...
    (microsoft.public.windowsce.platbuilder)
  • RGB Color Balance
    ... I am writing a display driver for Windows Ce 5.0. ... // init cursor related vars ... // check for line overlap with cursor and turn off cursor if overlaps ...
    (microsoft.public.windowsce.platbuilder)
  • Re: How to show/hide cursor on attach/deattach usb mouse
    ... Along with that Display Driver is modified with RequestDeviceNotifications, ... and switching on/off the cursor. ... handling USB mouse device notifications. ...
    (microsoft.public.windowsce.platbuilder)