From 25ffd2e1463473910adc8cb24c5e9f0fbfe5ff69 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 26 Sep 2006 08:36:54 +0000 Subject: do not update border when we don't see it. some more cleanup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11055 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/zxbox/spscr.c | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) (limited to 'apps/plugins/zxbox/spscr.c') diff --git a/apps/plugins/zxbox/spscr.c b/apps/plugins/zxbox/spscr.c index 4cae8654ae..6b85904d11 100644 --- a/apps/plugins/zxbox/spscr.c +++ b/apps/plugins/zxbox/spscr.c @@ -82,6 +82,7 @@ byte *update_screen_line(byte *scrp, int coli, int scri, int border, cmark = *cmarkp; scrptr = (qbyte *) scrp; if(scri >= 0) { /* normal line */ +#if LCD_WIDTH == 320 && ( LCD_HEIGHT == 240 || LCD_HEIGHT == 200 ) if(SPNM(border_update)) { brd_color = SPNM(colors)[border]; brd_color |= brd_color << 8; @@ -91,7 +92,10 @@ byte *update_screen_line(byte *scrp, int coli, int scri, int border, for(i = 8; i; i--) *scrptr++ = brd_color; scrptr -= 0x48; } - else scrptr += 0x08; + else +#endif + scrptr += 0x08; + tmptr = SPNM(scr_mark) + 0x2C0 + (coli >> 3); mark = *tmptr; if(!(coli & 0x07)) { @@ -129,40 +133,23 @@ byte *update_screen_line(byte *scrp, int coli, int scri, int border, else scrptr += 0x48; } else if(scri == -1) { /* only border */ +#if LCD_WIDTH == 320 && ( LCD_HEIGHT == 240 || LCD_HEIGHT == 200 ) if(SPNM(border_update)) { brd_color = SPNM(colors)[border]; brd_color |= brd_color << 8; brd_color |= brd_color << 16; for(i = 0x50; i; i--) *scrptr++ = brd_color; } - else scrptr += 0x50; + else +#endif + scrptr += 0x50; + } *cmarkp = cmark; return (byte *) scrptr; } -void translate_screen(void) -{ - int border, scline; - byte *scrptr; - qbyte cmark = 0; - - scrptr = (byte *) SPNM(image); - - border = DANM(ula_outport) & 0x07; - if(border != SPNM(lastborder)) { - SPNM(border_update) = 2; - SPNM(lastborder) = border; - } - - for(scline = 0; scline < (TMNUM / 2); scline++) - scrptr = update_screen_line(scrptr, SPNM(coli)[scline], SPNM(scri)[scline], - border, &cmark); - -} - - void spscr_init_mask_color(void) { int clb; -- cgit v1.2.3