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 | |
parent | 096eb687a68c5ff90436ee0c65b2a1674813b633 (diff) | |
download | rockbox-4993ec2a6e8891670e109c44c8c0d0e56cb1af6b.tar.gz rockbox-4993ec2a6e8891670e109c44c8c0d0e56cb1af6b.zip |
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
-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) | |||
246 | { | 246 | { |
247 | #ifdef BOOTLOADER | 247 | #ifdef BOOTLOADER |
248 | int i; | 248 | int i; |
249 | /* When the Rockbox bootloader starts, we are changing framebuffer address, | 249 | /* When the Rockbox bootloader starts the framebuffer address is changed |
250 | but we don't want what's shown on the LCD to change until we do an | 250 | * but the LCD display should stay the same til an lcd_update() occurs. |
251 | lcd_update(), so copy the data from the old framebuffer to the new one */ | 251 | * This copies the data from the old framebuffer to the new one to make the |
252 | unsigned short *buf = (unsigned short*)FRAME; | 252 | * change non-visable to the user. |
253 | 253 | */ | |
254 | memcpy(FRAME, (short *)((LCDSADDR1)<<1), 320*240*2); | 254 | unsigned short *buf = (unsigned short*)(FRAME); |
255 | unsigned short *oldbuf = (unsigned short*)(LCDSADDR1<<1); | ||
255 | 256 | ||
256 | /* The Rockbox bootloader is transitioning from RGB555I to RGB565 mode | 257 | /* The Rockbox bootloader is transitioning from RGB555I to RGB565 mode |
257 | so convert the frambuffer data accordingly */ | 258 | so convert the frambuffer data accordingly */ |
258 | for(i=0; i< 320*240; i++){ | 259 | for(i=0; i< 320*240; i++) |
259 | *buf = ((*buf>>1) & 0x1F) | (*buf & 0xffc0); | 260 | { |
260 | buf++; | 261 | *(buf++) = ((*oldbuf>>1) & 0x1F) | (*oldbuf & 0xffc0); |
262 | oldbuf++; | ||
261 | } | 263 | } |
262 | #endif | 264 | #endif |
263 | 265 | ||
264 | |||
265 | /* Set pins up */ | 266 | /* Set pins up */ |
266 | 267 | ||
267 | GPHUP &= 0x600; | 268 | GPHUP &= 0x600; |