diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-03-03 18:10:22 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-03-03 18:10:22 +0000 |
commit | 4993ec2a6e8891670e109c44c8c0d0e56cb1af6b (patch) | |
tree | 78ed2577c0f5f433090e193b54e12cede54da6bc /firmware/target/arm/s3c2440 | |
parent | 096eb687a68c5ff90436ee0c65b2a1674813b633 (diff) |
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
Diffstat (limited to 'firmware/target/arm/s3c2440')
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c | 21 |
1 files changed, 11 insertions, 10 deletions
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; |