summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy/sys_rockbox.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-06-18 07:15:00 +0200
committerThomas Martitz <kugel@rockbox.org>2014-06-21 00:15:53 +0200
commita1842c04f9cb73210d4cacde61a9e4b115050765 (patch)
treea37af61ef9285b763a42cd33797e2f3d634fbf9f /apps/plugins/rockboy/sys_rockbox.c
parent0250be1d6799db7b5ddc99cb33f31bf9cff01ed2 (diff)
downloadrockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.tar.gz
rockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.zip
lcd-24bit: Introduce a 24-bit mid-level LCD driver
With LCD driver all calculation will be performed on RGB888 and the hardware/OS can display from our 24bit framebuffer. It is not yet as performance optimized as the existing drivers but should be good enough.The vast number of small changes is due to the fact that fb_data can be a struct type now, while most of the code expected a scalar type. lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit it enforces the generic C code. All plugins are ported over. Except for rockpaint. It uses so much memory that it wouldnt fit into the 512k plugin buffer anymore (patches welcome). Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
Diffstat (limited to 'apps/plugins/rockboy/sys_rockbox.c')
-rw-r--r--apps/plugins/rockboy/sys_rockbox.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c
index 1bf63b7a74..a758f73da3 100644
--- a/apps/plugins/rockboy/sys_rockbox.c
+++ b/apps/plugins/rockboy/sys_rockbox.c
@@ -261,12 +261,21 @@ void vid_init(void)
261 fb.enabled=1; 261 fb.enabled=1;
262 262
263#if defined(HAVE_LCD_COLOR) 263#if defined(HAVE_LCD_COLOR)
264#if LCD_DEPTH == 24
265 fb.cc[0].r = 0; /* 8-8 (wasted bits on red) */
266 fb.cc[0].l = 16; /* this is the offset to the R bits (24-8) */
267 fb.cc[1].r = 0; /* 8-6 (wasted bits on green) */
268 fb.cc[1].l = 8; /* This is the offset to the G bits (24-8-8) */
269 fb.cc[2].r = 0; /* 8-5 (wasted bits on red) */
270 fb.cc[2].l = 0; /* This is the offset to the B bits (24-8-8-8) */
271#else
264 fb.cc[0].r = 3; /* 8-5 (wasted bits on red) */ 272 fb.cc[0].r = 3; /* 8-5 (wasted bits on red) */
265 fb.cc[0].l = 11; /* this is the offset to the R bits (16-5) */ 273 fb.cc[0].l = 11; /* this is the offset to the R bits (16-5) */
266 fb.cc[1].r = 2; /* 8-6 (wasted bits on green) */ 274 fb.cc[1].r = 2; /* 8-6 (wasted bits on green) */
267 fb.cc[1].l = 5; /* This is the offset to the G bits (16-5-6) */ 275 fb.cc[1].l = 5; /* This is the offset to the G bits (16-5-6) */
268 fb.cc[2].r = 3; /* 8-5 (wasted bits on red) */ 276 fb.cc[2].r = 3; /* 8-5 (wasted bits on red) */
269 fb.cc[2].l = 0; /* This is the offset to the B bits (16-5-6-5) */ 277 fb.cc[2].l = 0; /* This is the offset to the B bits (16-5-6-5) */
278#endif
270#else 279#else
271 fb.mode=3; 280 fb.mode=3;
272#endif 281#endif