rendered paste bodyIndex: apps/plugins/SOURCES
===================================================================
--- apps/plugins/SOURCES (revision 15086)
+++ apps/plugins/SOURCES (working copy)
@@ -1,4 +1,5 @@
/* plugins common to all models */
+test_fps.c
battery_bench.c
chessclock.c
credits.c
Index: firmware/target/arm/iriver/h10/lcd-h10_20gb.c
===================================================================
--- firmware/target/arm/iriver/h10/lcd-h10_20gb.c (revision 15086)
+++ firmware/target/arm/iriver/h10/lcd-h10_20gb.c (working copy)
@@ -575,7 +578,7 @@
{
int x1, y1;
- unsigned short *addr = (unsigned short *)lcd_framebuffer;
+ unsigned long *addr;
if (!display_on)
return;
@@ -612,19 +615,41 @@
/* start drawing */
lcd_send_cmd(R_WRITE_DATA_2_GRAM);
- addr = (unsigned short*)&lcd_framebuffer[y0][x0];
+ addr = (unsigned long*)&lcd_framebuffer[y0][x0];
- int c, r;
+ while (height > 0) {
+ int c, r;
+ int h, pixels_to_write;
- /* for each row */
- for (r = 0; r < height; r++) {
- /* for each column */
- for (c = 0; c < width; c++) {
- /* output 1 pixel */
- lcd_send_data_swapped(*addr++);
+ pixels_to_write = (width * height) * 2;
+ h = height;
+
+ /* calculate how much we can do in one go */
+ if (pixels_to_write > 0x10000) {
+ h = (0x10000/2) / width;
+ pixels_to_write = (width * h) * 2;
}
- addr += LCD_WIDTH - width;
+ LCD2_BLOCK_CTRL = 0x10000080;
+ LCD2_BLOCK_CONFIG = 0xc0010000 | (pixels_to_write - 1);
+ LCD2_BLOCK_CTRL = 0x34000000;
+
+ /* for each row */
+ for (r = 0; r < h; r++) {
+ /* for each column */
+ for (c = 0; c < width; c += 2) {
+ while (!(LCD2_BLOCK_CTRL & LCD2_BLOCK_TXOK));
+
+ /* output 2 pixels */
+ LCD2_BLOCK_DATA = *addr++;
+ }
+ addr += (LCD_WIDTH - width)/2;
+ }
+
+ while (!(LCD2_BLOCK_CTRL & LCD2_BLOCK_READY));
+ LCD2_BLOCK_CONFIG = 0;
+
+ height -= h;
}
}