New lcd mode; drop top 8 and bottom 8 lines

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6135 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michiel Van Der Kolk 2005-03-04 12:48:29 +00:00
parent a17ee5f282
commit 984cd6e568
2 changed files with 21 additions and 8 deletions

View file

@ -739,13 +739,14 @@ void lcd_refreshline(void)
if (!(R_LCDC & 0x80)) if (!(R_LCDC & 0x80))
return; /* should not happen... */ return; /* should not happen... */
if ( ((fb.mode==0)&&(R_LY >= 128)) ||
((fb.mode==1)&&(R_LY < 16)) ||
((fb.mode==2)&&((R_LY<8)||(R_LY>=136)))
#if LCD_HEIGHT == 64 #if LCD_HEIGHT == 64
if ( ((fb.mode==0)&&(R_LY >= 128 || R_LY & 1)) || || (R_LY & 1) /* calculate only even lines */
((fb.mode==1)&&(R_LY < 16 || R_LY & 1))) /* calculate only even lines */
#else
if ( ((fb.mode==0)&&(R_LY >= 128)) ||
((fb.mode==1)&&(R_LY < 16)))
#endif #endif
)
return; return;
updatepatpix(); updatepatpix();

View file

@ -71,7 +71,7 @@ void joy_close(void)
#endif #endif
unsigned int oldbuttonstate = 0, newbuttonstate; unsigned int oldbuttonstate = 0, newbuttonstate,holdbutton;
void ev_poll(void) void ev_poll(void)
{ {
@ -82,7 +82,9 @@ void ev_poll(void)
pressed = newbuttonstate & ~oldbuttonstate; pressed = newbuttonstate & ~oldbuttonstate;
oldbuttonstate = newbuttonstate; oldbuttonstate = newbuttonstate;
#if CONFIG_KEYPAD == IRIVER_H100_PAD #if CONFIG_KEYPAD == IRIVER_H100_PAD
fb.mode=rb->button_hold(); if (rb->button_hold()&~holdbutton)
fb.mode=(fb.mode+1)%3;
holdbutton=rb->button_hold();
#endif #endif
if(released) { if(released) {
ev.type = EV_RELEASE; ev.type = EV_RELEASE;
@ -161,7 +163,12 @@ void vid_update(int scanline)
#if LCD_HEIGHT == 64 /* Archos */ #if LCD_HEIGHT == 64 /* Archos */
int balance = 0; int balance = 0;
if (fb.mode==1) if (fb.mode==1)
scanline-=16; scanline-=16;
else if (fb.mode==2) {
scanline-=8;
if(scanline>=128)
return;
}
scanline_remapped = scanline / 16; scanline_remapped = scanline / 16;
frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH; frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH;
while (cnt < 160) { while (cnt < 160) {
@ -235,6 +242,11 @@ void vid_update(int scanline)
#else /* LCD_HEIGHT != 64, iRiver */ #else /* LCD_HEIGHT != 64, iRiver */
if (fb.mode==1) if (fb.mode==1)
scanline-=16; scanline-=16;
else if (fb.mode==2) {
scanline-=8;
if(scanline>=128)
return;
}
#ifdef GRAYSCALE #ifdef GRAYSCALE
scanline_remapped = scanline / 4; scanline_remapped = scanline / 4;
#else #else