|
Rockbox mail archiveSubject: Iriver h300 lcd code.Iriver h300 lcd code.
From: Kaggen <kaggen_at_gmail.com>
Date: Mon, 21 Nov 2005 16:23:52 +0100 Hi, I'm working on a homebrew system and I'm using the same screen (controller-wise) as the iRiver H300. If anyone feels like it you can test this code for functionality & perfomance. But first let me say: sorry, I don't mean to use you as alpha testers for my code, but I don't have any hardware to test on at the moment. So far i've toyed with lcd_update. I'm working on lcd_blit (which is unimplemented in rockbox atm.) If someone feels like explaining the fb_data buffer pixel layout for me, I'd be happy aswell. At first I thought it was used for rendering fonts, despite it's name. It looks optimized for such use, since it renders an area using 8 pixels high rows, but I just realized that is a 8->16bit conversion and not 8x 1->2bpp (which is perfect for B/W fonts). Regards, Anders Next time I'll make a patch instead: ################################### void lcd_update_rect(int x, int y, int width, int height) { int ymax = y + height; if(x + width > LCD_WIDTH) width = LCD_WIDTH - x; if (width <= 0) return; /* nothing left to do, 0 is harmful to lcd_write_data() */ if(ymax >= LCD_HEIGHT) ymax = LCD_HEIGHT-1; /* set update window */ lcd_write_reg(0x44, (ymax<<8) | y); /* horiz ram addr */ lcd_write_reg(0x45, ((x+width-1)<<8) | x); /* vert ram addr */ lcd_write_reg(0x21, (x<<8) | y); lcd_begin_write_gram(); /* Copy specified rectangle bitmap to hardware */ for (; y <= ymax; y++) { lcd_write_data ((unsigned short *)&lcd_framebuffer[y][x], width); } /* reset update window */ lcd_write_reg(0x44, 0xaf00); /* horiz ram addr */ lcd_write_reg(0x45, 0xdb00); /* vert ram addr */ } ################################### Received on 2005-11-21 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |