From 4993ec2a6e8891670e109c44c8c0d0e56cb1af6b Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Tue, 3 Mar 2009 18:10:22 +0000 Subject: 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 --- .../target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'firmware/target/arm/s3c2440') diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c index 62880790d1..d9a28d152f 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c @@ -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; -- cgit v1.2.3