1
0
Fork 0
forked from len0rd/rockbox

GigabeatFX: Change the way that the LCD copy routine works: Do the copy and translation in one step.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20195 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Karl Kurbjun 2009-03-03 18:10:22 +00:00
parent 096eb687a6
commit 4993ec2a6e

View file

@ -246,22 +246,23 @@ void lcd_init_device(void)
{
#ifdef BOOTLOADER
int i;
/* When the Rockbox bootloader starts, we are changing framebuffer address,
but we don't want what's shown on the LCD to change until we do an
lcd_update(), so copy the data from the old framebuffer to the new one */
unsigned short *buf = (unsigned short*)FRAME;
memcpy(FRAME, (short *)((LCDSADDR1)<<1), 320*240*2);
/* When the Rockbox bootloader starts the framebuffer address is changed
* but the LCD display should stay the same til an lcd_update() occurs.
* This copies the data from the old framebuffer to the new one to make the
* change non-visable to the user.
*/
unsigned short *buf = (unsigned short*)(FRAME);
unsigned short *oldbuf = (unsigned short*)(LCDSADDR1<<1);
/* The Rockbox bootloader is transitioning from RGB555I to RGB565 mode
so convert the frambuffer data accordingly */
for(i=0; i< 320*240; i++){
*buf = ((*buf>>1) & 0x1F) | (*buf & 0xffc0);
buf++;
for(i=0; i< 320*240; i++)
{
*(buf++) = ((*oldbuf>>1) & 0x1F) | (*oldbuf & 0xffc0);
oldbuf++;
}
#endif
/* Set pins up */
GPHUP &= 0x600;