mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-26 23:36:37 -04:00
Grayscale support for rockboy - can't work without markuns patch,
needs rockbox' internal framebuffer in 2 bit (4 pixels / byte) format. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6132 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ee811a3443
commit
ca2e99b4be
4 changed files with 29 additions and 2 deletions
|
|
@ -236,9 +236,22 @@ void vid_update(int scanline)
|
|||
#else /* LCD_HEIGHT != 64, iRiver */
|
||||
if (fb.mode==1)
|
||||
scanline-=16;
|
||||
#ifdef GRAYSCALE
|
||||
scanline_remapped = scanline / 4;
|
||||
#else
|
||||
scanline_remapped = scanline / 8;
|
||||
#endif
|
||||
frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH;
|
||||
while (cnt < 160) {
|
||||
#ifdef GRAYSCALE
|
||||
*(frameb++) = (scan.buf[0][cnt]&0x3) |
|
||||
((scan.buf[1][cnt]&0x3)<<2) |
|
||||
((scan.buf[2][cnt]&0x3)<<4) |
|
||||
((scan.buf[3][cnt]&0x3)<<6);
|
||||
cnt++;
|
||||
}
|
||||
rb->lcd_update_rect(0, scanline & ~3, LCD_WIDTH, 4); //8);
|
||||
#else
|
||||
register unsigned scrbyte = 0;
|
||||
if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01;
|
||||
if (scan.buf[1][cnt] & 0x02) scrbyte |= 0x02;
|
||||
|
|
@ -252,7 +265,8 @@ void vid_update(int scanline)
|
|||
cnt++;
|
||||
}
|
||||
rb->lcd_update_rect(0, scanline & ~7, LCD_WIDTH, 8);
|
||||
#endif
|
||||
#endif /* GRAYSCALE */
|
||||
#endif /* LCD_HEIGHT */
|
||||
}
|
||||
|
||||
void vid_end(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue