mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Rockboy: adapted to colour LCD (but no colours for gameboy color games yet). Some cleanup; killed a ton of TABs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7915 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
32877021a5
commit
59825952f3
4 changed files with 452 additions and 455 deletions
|
|
@ -16,10 +16,12 @@ struct scan
|
||||||
{
|
{
|
||||||
int bg[64];
|
int bg[64];
|
||||||
int wnd[64];
|
int wnd[64];
|
||||||
#if LCD_DEPTH == 2
|
#if LCD_DEPTH == 1
|
||||||
byte buf[4][256];
|
byte buf[8][256];
|
||||||
#else
|
#elif LCD_DEPTH == 2
|
||||||
byte buf[8][256];
|
byte buf[4][256];
|
||||||
|
#elif LCD_DEPTH > 4
|
||||||
|
byte buf[1][256];
|
||||||
#endif
|
#endif
|
||||||
byte pal1[128];
|
byte pal1[128];
|
||||||
un16 pal2[64];
|
un16 pal2[64];
|
||||||
|
|
|
||||||
|
|
@ -99,21 +99,21 @@ static byte *vdest;
|
||||||
#ifndef ASM_UPDATEPATPIX
|
#ifndef ASM_UPDATEPATPIX
|
||||||
void updatepatpix(void)
|
void updatepatpix(void)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
#if ((CONFIG_CPU != SH7034) && (CONFIG_CPU != MCF5249)) || defined(SIMULATOR)
|
#if ((CONFIG_CPU != SH7034) && (CONFIG_CPU != MCF5249)) || defined(SIMULATOR)
|
||||||
int k, a, c;
|
int k, a, c;
|
||||||
#endif
|
#endif
|
||||||
byte *vram = lcd.vbank[0];
|
byte *vram = lcd.vbank[0];
|
||||||
|
|
||||||
if (!anydirty) return;
|
if (!anydirty) return;
|
||||||
for (i = 0; i < 1024; i++)
|
for (i = 0; i < 1024; i++)
|
||||||
{
|
{
|
||||||
if (i == 384) i = 512;
|
if (i == 384) i = 512;
|
||||||
if (i == 896) break;
|
if (i == 896) break;
|
||||||
if (!patdirty[i]) continue;
|
if (!patdirty[i]) continue;
|
||||||
patdirty[i] = 0;
|
patdirty[i] = 0;
|
||||||
for (j = 0; j < 8; j++)
|
for (j = 0; j < 8; j++)
|
||||||
{
|
{
|
||||||
#if CONFIG_CPU == SH7034 && !defined(SIMULATOR)
|
#if CONFIG_CPU == SH7034 && !defined(SIMULATOR)
|
||||||
asm volatile (
|
asm volatile (
|
||||||
"mov.w @%2,r1 \n"
|
"mov.w @%2,r1 \n"
|
||||||
|
|
@ -248,18 +248,18 @@ void updatepatpix(void)
|
||||||
"d0", "d1", "d2"
|
"d0", "d1", "d2"
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
a = ((i<<4) | (j<<1));
|
a = ((i<<4) | (j<<1));
|
||||||
for (k = 0; k < 8; k++)
|
for (k = 0; k < 8; k++)
|
||||||
{
|
{
|
||||||
c = vram[a] & (1<<k) ? 1 : 0;
|
c = vram[a] & (1<<k) ? 1 : 0;
|
||||||
c |= vram[a+1] & (1<<k) ? 2 : 0;
|
c |= vram[a+1] & (1<<k) ? 2 : 0;
|
||||||
patpix[i+1024][j][k] = c;
|
patpix[i+1024][j][k] = c;
|
||||||
}
|
}
|
||||||
for (k = 0; k < 8; k++)
|
for (k = 0; k < 8; k++)
|
||||||
patpix[i][j][k] =
|
patpix[i][j][k] =
|
||||||
patpix[i+1024][j][7-k];
|
patpix[i+1024][j][7-k];
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#if CONFIG_CPU == SH7034 && !defined(SIMULATOR)
|
#if CONFIG_CPU == SH7034 && !defined(SIMULATOR)
|
||||||
asm volatile (
|
asm volatile (
|
||||||
"mov.l @%0,r0 \n"
|
"mov.l @%0,r0 \n"
|
||||||
|
|
@ -386,19 +386,19 @@ void updatepatpix(void)
|
||||||
"d0", "d1", "d2", "d3", "d4", "d5"
|
"d0", "d1", "d2", "d3", "d4", "d5"
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
for (j = 0; j < 8; j++)
|
for (j = 0; j < 8; j++)
|
||||||
{
|
{
|
||||||
for (k = 0; k < 8; k++)
|
for (k = 0; k < 8; k++)
|
||||||
{
|
{
|
||||||
patpix[i+2048][j][k] =
|
patpix[i+2048][j][k] =
|
||||||
patpix[i][7-j][k];
|
patpix[i][7-j][k];
|
||||||
patpix[i+3072][j][k] =
|
patpix[i+3072][j][k] =
|
||||||
patpix[i+1024][7-j][k];
|
patpix[i+1024][7-j][k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
anydirty = 0;
|
anydirty = 0;
|
||||||
}
|
}
|
||||||
#endif /* ASM_UPDATEPATPIX */
|
#endif /* ASM_UPDATEPATPIX */
|
||||||
|
|
||||||
|
|
@ -406,99 +406,99 @@ void updatepatpix(void)
|
||||||
|
|
||||||
void tilebuf(void)
|
void tilebuf(void)
|
||||||
{
|
{
|
||||||
int i, cnt;
|
int i, cnt;
|
||||||
int base;
|
int base;
|
||||||
byte *tilemap, *attrmap;
|
byte *tilemap, *attrmap;
|
||||||
int *tilebuf;
|
int *tilebuf;
|
||||||
int *wrap;
|
int *wrap;
|
||||||
static int wraptable[64] =
|
static int wraptable[64] =
|
||||||
{
|
{
|
||||||
0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,-32
|
0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,-32
|
||||||
};
|
};
|
||||||
|
|
||||||
base = ((R_LCDC&0x08)?0x1C00:0x1800) + (T<<5) + S;
|
base = ((R_LCDC&0x08)?0x1C00:0x1800) + (T<<5) + S;
|
||||||
tilemap = lcd.vbank[0] + base;
|
tilemap = lcd.vbank[0] + base;
|
||||||
attrmap = lcd.vbank[1] + base;
|
attrmap = lcd.vbank[1] + base;
|
||||||
tilebuf = BG;
|
tilebuf = BG;
|
||||||
wrap = wraptable + S;
|
wrap = wraptable + S;
|
||||||
cnt = ((WX + 7) >> 3) + 1;
|
cnt = ((WX + 7) >> 3) + 1;
|
||||||
|
|
||||||
if (hw.cgb) {
|
if (hw.cgb) {
|
||||||
if (R_LCDC & 0x10)
|
if (R_LCDC & 0x10)
|
||||||
for (i = cnt; i > 0; i--)
|
for (i = cnt; i > 0; i--)
|
||||||
{
|
{
|
||||||
*(tilebuf++) = *tilemap
|
*(tilebuf++) = *tilemap
|
||||||
| (((int)*attrmap & 0x08) << 6)
|
| (((int)*attrmap & 0x08) << 6)
|
||||||
| (((int)*attrmap & 0x60) << 5);
|
| (((int)*attrmap & 0x60) << 5);
|
||||||
*(tilebuf++) = (((int)*attrmap & 0x07) << 2);
|
*(tilebuf++) = (((int)*attrmap & 0x07) << 2);
|
||||||
attrmap += *wrap + 1;
|
attrmap += *wrap + 1;
|
||||||
tilemap += *(wrap++) + 1;
|
tilemap += *(wrap++) + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for (i = cnt; i > 0; i--)
|
for (i = cnt; i > 0; i--)
|
||||||
{
|
{
|
||||||
*(tilebuf++) = (256 + ((n8)*tilemap))
|
*(tilebuf++) = (256 + ((n8)*tilemap))
|
||||||
| (((int)*attrmap & 0x08) << 6)
|
| (((int)*attrmap & 0x08) << 6)
|
||||||
| (((int)*attrmap & 0x60) << 5);
|
| (((int)*attrmap & 0x60) << 5);
|
||||||
*(tilebuf++) = (((int)*attrmap & 0x07) << 2);
|
*(tilebuf++) = (((int)*attrmap & 0x07) << 2);
|
||||||
attrmap += *wrap + 1;
|
attrmap += *wrap + 1;
|
||||||
tilemap += *(wrap++) + 1;
|
tilemap += *(wrap++) + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (R_LCDC & 0x10)
|
if (R_LCDC & 0x10)
|
||||||
for (i = cnt; i > 0; i--)
|
for (i = cnt; i > 0; i--)
|
||||||
{
|
{
|
||||||
*(tilebuf++) = *(tilemap++);
|
*(tilebuf++) = *(tilemap++);
|
||||||
tilemap += *(wrap++);
|
tilemap += *(wrap++);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for (i = cnt; i > 0; i--)
|
for (i = cnt; i > 0; i--)
|
||||||
{
|
{
|
||||||
*(tilebuf++) = (256 + ((n8)*(tilemap++)));
|
*(tilebuf++) = (256 + ((n8)*(tilemap++)));
|
||||||
tilemap += *(wrap++);
|
tilemap += *(wrap++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WX >= 160) return;
|
if (WX >= 160) return;
|
||||||
|
|
||||||
base = ((R_LCDC&0x40)?0x1C00:0x1800) + (WT<<5);
|
base = ((R_LCDC&0x40)?0x1C00:0x1800) + (WT<<5);
|
||||||
tilemap = lcd.vbank[0] + base;
|
tilemap = lcd.vbank[0] + base;
|
||||||
attrmap = lcd.vbank[1] + base;
|
attrmap = lcd.vbank[1] + base;
|
||||||
tilebuf = WND;
|
tilebuf = WND;
|
||||||
cnt = ((160 - WX) >> 3) + 1;
|
cnt = ((160 - WX) >> 3) + 1;
|
||||||
|
|
||||||
if (hw.cgb)
|
if (hw.cgb)
|
||||||
{
|
{
|
||||||
if (R_LCDC & 0x10)
|
if (R_LCDC & 0x10)
|
||||||
for (i = cnt; i > 0; i--)
|
for (i = cnt; i > 0; i--)
|
||||||
{
|
{
|
||||||
*(tilebuf++) = *(tilemap++)
|
*(tilebuf++) = *(tilemap++)
|
||||||
| (((int)*attrmap & 0x08) << 6)
|
| (((int)*attrmap & 0x08) << 6)
|
||||||
| (((int)*attrmap & 0x60) << 5);
|
| (((int)*attrmap & 0x60) << 5);
|
||||||
*(tilebuf++) = (((int)*(attrmap++)&7) << 2);
|
*(tilebuf++) = (((int)*(attrmap++)&7) << 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for (i = cnt; i > 0; i--)
|
for (i = cnt; i > 0; i--)
|
||||||
{
|
{
|
||||||
*(tilebuf++) = (256 + ((n8)*(tilemap++)))
|
*(tilebuf++) = (256 + ((n8)*(tilemap++)))
|
||||||
| (((int)*attrmap & 0x08) << 6)
|
| (((int)*attrmap & 0x08) << 6)
|
||||||
| (((int)*attrmap & 0x60) << 5);
|
| (((int)*attrmap & 0x60) << 5);
|
||||||
*(tilebuf++) = (((int)*(attrmap++)&7) << 2);
|
*(tilebuf++) = (((int)*(attrmap++)&7) << 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
||||||
{
|
{
|
||||||
if (R_LCDC & 0x10)
|
if (R_LCDC & 0x10)
|
||||||
for (i = cnt; i > 0; i--)
|
for (i = cnt; i > 0; i--)
|
||||||
*(tilebuf++) = *(tilemap++);
|
*(tilebuf++) = *(tilemap++);
|
||||||
else
|
else
|
||||||
for (i = cnt; i > 0; i--)
|
for (i = cnt; i > 0; i--)
|
||||||
*(tilebuf++) = (256 + ((n8)*(tilemap++)));
|
*(tilebuf++) = (256 + ((n8)*(tilemap++)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -507,318 +507,318 @@ void tilebuf(void)
|
||||||
// U = start...something...thingy... 7 at most
|
// U = start...something...thingy... 7 at most
|
||||||
void bg_scan(void)
|
void bg_scan(void)
|
||||||
{
|
{
|
||||||
int cnt;
|
int cnt;
|
||||||
byte *src, *dest;
|
byte *src, *dest;
|
||||||
int *tile;
|
int *tile;
|
||||||
|
|
||||||
if (WX <= 0) return;
|
if (WX <= 0) return;
|
||||||
cnt = WX;
|
cnt = WX;
|
||||||
tile = BG;
|
tile = BG;
|
||||||
dest = BUF;
|
dest = BUF;
|
||||||
|
|
||||||
src = patpix[*(tile++)][V] + U;
|
src = patpix[*(tile++)][V] + U;
|
||||||
memcpy(dest, src, 8-U);
|
memcpy(dest, src, 8-U);
|
||||||
dest += 8-U;
|
dest += 8-U;
|
||||||
cnt -= 8-U;
|
cnt -= 8-U;
|
||||||
if (cnt <= 0) return;
|
if (cnt <= 0) return;
|
||||||
while (cnt >= 8)
|
while (cnt >= 8)
|
||||||
{
|
{
|
||||||
src = patpix[*(tile++)][V];
|
src = patpix[*(tile++)][V];
|
||||||
MEMCPY8(dest, src);
|
MEMCPY8(dest, src);
|
||||||
dest += 8;
|
dest += 8;
|
||||||
cnt -= 8;
|
cnt -= 8;
|
||||||
}
|
}
|
||||||
src = patpix[*tile][V];
|
src = patpix[*tile][V];
|
||||||
while (cnt--)
|
while (cnt--)
|
||||||
*(dest++) = *(src++);
|
*(dest++) = *(src++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wnd_scan(void)
|
void wnd_scan(void)
|
||||||
{
|
{
|
||||||
int cnt;
|
int cnt;
|
||||||
byte *src, *dest;
|
byte *src, *dest;
|
||||||
int *tile;
|
int *tile;
|
||||||
|
|
||||||
if (WX >= 160) return;
|
if (WX >= 160) return;
|
||||||
cnt = 160 - WX;
|
cnt = 160 - WX;
|
||||||
tile = WND;
|
tile = WND;
|
||||||
dest = BUF + WX;
|
dest = BUF + WX;
|
||||||
|
|
||||||
while (cnt >= 8)
|
while (cnt >= 8)
|
||||||
{
|
{
|
||||||
src = patpix[*(tile++)][WV];
|
src = patpix[*(tile++)][WV];
|
||||||
MEMCPY8(dest, src);
|
MEMCPY8(dest, src);
|
||||||
dest += 8;
|
dest += 8;
|
||||||
cnt -= 8;
|
cnt -= 8;
|
||||||
}
|
}
|
||||||
src = patpix[*tile][WV];
|
src = patpix[*tile][WV];
|
||||||
while (cnt--)
|
while (cnt--)
|
||||||
*(dest++) = *(src++);
|
*(dest++) = *(src++);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void blendcpy(byte *dest, byte *src, byte b, int cnt)
|
static void blendcpy(byte *dest, byte *src, byte b, int cnt)
|
||||||
{
|
{
|
||||||
while (cnt--) *(dest++) = *(src++) | b;
|
while (cnt--) *(dest++) = *(src++) | b;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int priused(void *attr)
|
static int priused(void *attr)
|
||||||
{
|
{
|
||||||
un32 *a = attr;
|
un32 *a = attr;
|
||||||
return (int)((a[0]|a[1]|a[2]|a[3]|a[4]|a[5]|a[6]|a[7])&0x80808080);
|
return (int)((a[0]|a[1]|a[2]|a[3]|a[4]|a[5]|a[6]|a[7])&0x80808080);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bg_scan_pri(void)
|
void bg_scan_pri(void)
|
||||||
{
|
{
|
||||||
int cnt, i;
|
int cnt, i;
|
||||||
byte *src, *dest;
|
byte *src, *dest;
|
||||||
|
|
||||||
if (WX <= 0) return;
|
if (WX <= 0) return;
|
||||||
i = S;
|
i = S;
|
||||||
cnt = WX;
|
cnt = WX;
|
||||||
dest = PRI;
|
dest = PRI;
|
||||||
src = lcd.vbank[1] + ((R_LCDC&0x08)?0x1C00:0x1800) + (T<<5);
|
src = lcd.vbank[1] + ((R_LCDC&0x08)?0x1C00:0x1800) + (T<<5);
|
||||||
|
|
||||||
if (!priused(src))
|
if (!priused(src))
|
||||||
{
|
{
|
||||||
memset(dest, 0, cnt);
|
memset(dest, 0, cnt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(dest, src[i++&31]&128, 8-U);
|
memset(dest, src[i++&31]&128, 8-U);
|
||||||
dest += 8-U;
|
dest += 8-U;
|
||||||
cnt -= 8-U;
|
cnt -= 8-U;
|
||||||
if (cnt <= 0) return;
|
if (cnt <= 0) return;
|
||||||
while (cnt >= 8)
|
while (cnt >= 8)
|
||||||
{
|
{
|
||||||
memset(dest, src[i++&31]&128, 8);
|
memset(dest, src[i++&31]&128, 8);
|
||||||
dest += 8;
|
dest += 8;
|
||||||
cnt -= 8;
|
cnt -= 8;
|
||||||
}
|
}
|
||||||
memset(dest, src[i&31]&128, cnt);
|
memset(dest, src[i&31]&128, cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wnd_scan_pri(void)
|
void wnd_scan_pri(void)
|
||||||
{
|
{
|
||||||
int cnt, i;
|
int cnt, i;
|
||||||
byte *src, *dest;
|
byte *src, *dest;
|
||||||
|
|
||||||
if (WX >= 160) return;
|
if (WX >= 160) return;
|
||||||
i = 0;
|
i = 0;
|
||||||
cnt = 160 - WX;
|
cnt = 160 - WX;
|
||||||
dest = PRI + WX;
|
dest = PRI + WX;
|
||||||
src = lcd.vbank[1] + ((R_LCDC&0x40)?0x1C00:0x1800) + (WT<<5);
|
src = lcd.vbank[1] + ((R_LCDC&0x40)?0x1C00:0x1800) + (WT<<5);
|
||||||
|
|
||||||
if (!priused(src))
|
if (!priused(src))
|
||||||
{
|
{
|
||||||
memset(dest, 0, cnt);
|
memset(dest, 0, cnt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (cnt >= 8)
|
while (cnt >= 8)
|
||||||
{
|
{
|
||||||
memset(dest, src[i++]&128, 8);
|
memset(dest, src[i++]&128, 8);
|
||||||
dest += 8;
|
dest += 8;
|
||||||
cnt -= 8;
|
cnt -= 8;
|
||||||
}
|
}
|
||||||
memset(dest, src[i]&128, cnt);
|
memset(dest, src[i]&128, cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bg_scan_color(void)
|
void bg_scan_color(void)
|
||||||
{
|
{
|
||||||
int cnt;
|
int cnt;
|
||||||
byte *src, *dest;
|
byte *src, *dest;
|
||||||
int *tile;
|
int *tile;
|
||||||
|
|
||||||
if (WX <= 0) return;
|
if (WX <= 0) return;
|
||||||
cnt = WX;
|
cnt = WX;
|
||||||
tile = BG;
|
tile = BG;
|
||||||
dest = BUF;
|
dest = BUF;
|
||||||
|
|
||||||
src = patpix[*(tile++)][V] + U;
|
src = patpix[*(tile++)][V] + U;
|
||||||
blendcpy(dest, src, *(tile++), 8-U);
|
blendcpy(dest, src, *(tile++), 8-U);
|
||||||
dest += 8-U;
|
dest += 8-U;
|
||||||
cnt -= 8-U;
|
cnt -= 8-U;
|
||||||
if (cnt <= 0) return;
|
if (cnt <= 0) return;
|
||||||
while (cnt >= 8)
|
while (cnt >= 8)
|
||||||
{
|
{
|
||||||
src = patpix[*(tile++)][V];
|
src = patpix[*(tile++)][V];
|
||||||
blendcpy(dest, src, *(tile++), 8);
|
blendcpy(dest, src, *(tile++), 8);
|
||||||
dest += 8;
|
dest += 8;
|
||||||
cnt -= 8;
|
cnt -= 8;
|
||||||
}
|
}
|
||||||
src = patpix[*(tile++)][V];
|
src = patpix[*(tile++)][V];
|
||||||
blendcpy(dest, src, *(tile++), cnt);
|
blendcpy(dest, src, *(tile++), cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wnd_scan_color(void)
|
void wnd_scan_color(void)
|
||||||
{
|
{
|
||||||
int cnt;
|
int cnt;
|
||||||
byte *src, *dest;
|
byte *src, *dest;
|
||||||
int *tile;
|
int *tile;
|
||||||
|
|
||||||
if (WX >= 160) return;
|
if (WX >= 160) return;
|
||||||
cnt = 160 - WX;
|
cnt = 160 - WX;
|
||||||
tile = WND;
|
tile = WND;
|
||||||
dest = BUF + WX;
|
dest = BUF + WX;
|
||||||
|
|
||||||
while (cnt >= 8)
|
while (cnt >= 8)
|
||||||
{
|
{
|
||||||
src = patpix[*(tile++)][WV];
|
src = patpix[*(tile++)][WV];
|
||||||
blendcpy(dest, src, *(tile++), 8);
|
blendcpy(dest, src, *(tile++), 8);
|
||||||
dest += 8;
|
dest += 8;
|
||||||
cnt -= 8;
|
cnt -= 8;
|
||||||
}
|
}
|
||||||
src = patpix[*(tile++)][WV];
|
src = patpix[*(tile++)][WV];
|
||||||
blendcpy(dest, src, *(tile++), cnt);
|
blendcpy(dest, src, *(tile++), cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void recolor(byte *buf, byte fill, int cnt)
|
static void recolor(byte *buf, byte fill, int cnt)
|
||||||
{
|
{
|
||||||
while (cnt--) *(buf++) |= fill;
|
while (cnt--) *(buf++) |= fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
void spr_count(void)
|
void spr_count(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct obj *o;
|
struct obj *o;
|
||||||
|
|
||||||
NS = 0;
|
NS = 0;
|
||||||
if (!(R_LCDC & 0x02)) return;
|
if (!(R_LCDC & 0x02)) return;
|
||||||
|
|
||||||
o = lcd.oam.obj;
|
o = lcd.oam.obj;
|
||||||
|
|
||||||
for (i = 40; i; i--, o++)
|
for (i = 40; i; i--, o++)
|
||||||
{
|
{
|
||||||
if (L >= o->y || L + 16 < o->y)
|
if (L >= o->y || L + 16 < o->y)
|
||||||
continue;
|
continue;
|
||||||
if (L + 8 >= o->y && !(R_LCDC & 0x04))
|
if (L + 8 >= o->y && !(R_LCDC & 0x04))
|
||||||
continue;
|
continue;
|
||||||
if (++NS == 10) break;
|
if (++NS == 10) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void spr_enum(void)
|
void spr_enum(void)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
struct obj *o;
|
struct obj *o;
|
||||||
struct vissprite ts[10];
|
struct vissprite ts[10];
|
||||||
int v, pat;
|
int v, pat;
|
||||||
int l, x;
|
int l, x;
|
||||||
|
|
||||||
NS = 0;
|
NS = 0;
|
||||||
if (!(R_LCDC & 0x02)) return;
|
if (!(R_LCDC & 0x02)) return;
|
||||||
|
|
||||||
o = lcd.oam.obj;
|
o = lcd.oam.obj;
|
||||||
|
|
||||||
for (i = 40; i; i--, o++)
|
for (i = 40; i; i--, o++)
|
||||||
{
|
{
|
||||||
if (L >= o->y || L + 16 < o->y)
|
if (L >= o->y || L + 16 < o->y)
|
||||||
continue;
|
continue;
|
||||||
if (L + 8 >= o->y && !(R_LCDC & 0x04))
|
if (L + 8 >= o->y && !(R_LCDC & 0x04))
|
||||||
continue;
|
continue;
|
||||||
VS[NS].x = (int)o->x - 8;
|
VS[NS].x = (int)o->x - 8;
|
||||||
v = L - (int)o->y + 16;
|
v = L - (int)o->y + 16;
|
||||||
if (hw.cgb)
|
if (hw.cgb)
|
||||||
{
|
{
|
||||||
pat = o->pat | (((int)o->flags & 0x60) << 5)
|
pat = o->pat | (((int)o->flags & 0x60) << 5)
|
||||||
| (((int)o->flags & 0x08) << 6);
|
| (((int)o->flags & 0x08) << 6);
|
||||||
VS[NS].pal = 32 + ((o->flags & 0x07) << 2);
|
VS[NS].pal = 32 + ((o->flags & 0x07) << 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pat = o->pat | (((int)o->flags & 0x60) << 5);
|
pat = o->pat | (((int)o->flags & 0x60) << 5);
|
||||||
VS[NS].pal = 32 + ((o->flags & 0x10) >> 2);
|
VS[NS].pal = 32 + ((o->flags & 0x10) >> 2);
|
||||||
}
|
}
|
||||||
VS[NS].pri = (o->flags & 0x80) >> 7;
|
VS[NS].pri = (o->flags & 0x80) >> 7;
|
||||||
if ((R_LCDC & 0x04))
|
if ((R_LCDC & 0x04))
|
||||||
{
|
{
|
||||||
pat &= ~1;
|
pat &= ~1;
|
||||||
if (v >= 8)
|
if (v >= 8)
|
||||||
{
|
{
|
||||||
v -= 8;
|
v -= 8;
|
||||||
pat++;
|
pat++;
|
||||||
}
|
}
|
||||||
if (o->flags & 0x40) pat ^= 1;
|
if (o->flags & 0x40) pat ^= 1;
|
||||||
}
|
}
|
||||||
VS[NS].buf = patpix[pat][v];
|
VS[NS].buf = patpix[pat][v];
|
||||||
if (++NS == 10) break;
|
if (++NS == 10) break;
|
||||||
}
|
}
|
||||||
if (!sprsort||hw.cgb) return;
|
if (!sprsort||hw.cgb) return;
|
||||||
/* not quite optimal but it finally works! */
|
/* not quite optimal but it finally works! */
|
||||||
for (i = 0; i < NS; i++)
|
for (i = 0; i < NS; i++)
|
||||||
{
|
{
|
||||||
l = 0;
|
l = 0;
|
||||||
x = VS[0].x;
|
x = VS[0].x;
|
||||||
for (j = 1; j < NS; j++)
|
for (j = 1; j < NS; j++)
|
||||||
{
|
{
|
||||||
if (VS[j].x < x)
|
if (VS[j].x < x)
|
||||||
{
|
{
|
||||||
l = j;
|
l = j;
|
||||||
x = VS[j].x;
|
x = VS[j].x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ts[i] = VS[l];
|
ts[i] = VS[l];
|
||||||
VS[l].x = 160;
|
VS[l].x = 160;
|
||||||
}
|
}
|
||||||
memcpy(VS, ts, sizeof VS);
|
memcpy(VS, ts, sizeof VS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void spr_scan(void)
|
void spr_scan(void)
|
||||||
{
|
{
|
||||||
int i, x;
|
int i, x;
|
||||||
byte pal, b, ns = NS;
|
byte pal, b, ns = NS;
|
||||||
byte *src, *dest, *bg, *pri;
|
byte *src, *dest, *bg, *pri;
|
||||||
struct vissprite *vs;
|
struct vissprite *vs;
|
||||||
static byte bgdup[256];
|
static byte bgdup[256];
|
||||||
|
|
||||||
if (!ns) return;
|
if (!ns) return;
|
||||||
|
|
||||||
memcpy(bgdup, BUF, 256);
|
memcpy(bgdup, BUF, 256);
|
||||||
vs = &VS[ns-1];
|
vs = &VS[ns-1];
|
||||||
|
|
||||||
for (; ns; ns--, vs--)
|
for (; ns; ns--, vs--)
|
||||||
{
|
{
|
||||||
x = vs->x;
|
x = vs->x;
|
||||||
if (x >= 160) continue;
|
if (x >= 160) continue;
|
||||||
if (x <= -8) continue;
|
if (x <= -8) continue;
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
{
|
{
|
||||||
src = vs->buf - x;
|
src = vs->buf - x;
|
||||||
dest = BUF;
|
dest = BUF;
|
||||||
i = 8 + x;
|
i = 8 + x;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
src = vs->buf;
|
src = vs->buf;
|
||||||
dest = BUF + x;
|
dest = BUF + x;
|
||||||
if (x > 152) i = 160 - x;
|
if (x > 152) i = 160 - x;
|
||||||
else i = 8;
|
else i = 8;
|
||||||
}
|
}
|
||||||
pal = vs->pal;
|
pal = vs->pal;
|
||||||
if (vs->pri)
|
if (vs->pri)
|
||||||
{
|
{
|
||||||
bg = bgdup + (dest - BUF);
|
bg = bgdup + (dest - BUF);
|
||||||
while (i--)
|
while (i--)
|
||||||
{
|
{
|
||||||
b = src[i];
|
b = src[i];
|
||||||
if (b && !(bg[i]&3)) dest[i] = pal|b;
|
if (b && !(bg[i]&3)) dest[i] = pal|b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (hw.cgb)
|
else if (hw.cgb)
|
||||||
{
|
{
|
||||||
bg = bgdup + (dest - BUF);
|
bg = bgdup + (dest - BUF);
|
||||||
pri = PRI + (dest - BUF);
|
pri = PRI + (dest - BUF);
|
||||||
while (i--)
|
while (i--)
|
||||||
{
|
{
|
||||||
b = src[i];
|
b = src[i];
|
||||||
if (b && (!pri[i] || !(bg[i]&3)))
|
if (b && (!pri[i] || !(bg[i]&3)))
|
||||||
dest[i] = pal|b;
|
dest[i] = pal|b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else while (i--) if (src[i]) dest[i] = pal|src[i];
|
else while (i--) if (src[i]) dest[i] = pal|src[i];
|
||||||
/* else while (i--) if (src[i]) dest[i] = 31 + ns; */
|
/* else while (i--) if (src[i]) dest[i] = 31 + ns; */
|
||||||
}
|
}
|
||||||
// if (sprdebug) for (i = 0; i < NS; i++) BUF[i<<1] = 36;
|
// if (sprdebug) for (i = 0; i < NS; i++) BUF[i<<1] = 36;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -828,43 +828,45 @@ void spr_scan(void)
|
||||||
|
|
||||||
void lcd_begin(void)
|
void lcd_begin(void)
|
||||||
{
|
{
|
||||||
/* if (fb.indexed)
|
/* if (fb.indexed)
|
||||||
{
|
{
|
||||||
if (rgb332) pal_set332();
|
if (rgb332) pal_set332();
|
||||||
else pal_expire();
|
else pal_expire();
|
||||||
}
|
}
|
||||||
while (scale * 160 > fb.w || scale * 144 > fb.h) scale--; */
|
while (scale * 160 > fb.w || scale * 144 > fb.h) scale--; */
|
||||||
vdest = fb.ptr + ((fb.w*fb.pelsize)>>1)
|
vdest = fb.ptr + ((fb.w*fb.pelsize)>>1)
|
||||||
- (80*fb.pelsize)
|
- (80*fb.pelsize)
|
||||||
+ ((fb.h>>1) - 72) * fb.pitch;
|
+ ((fb.h>>1) - 72) * fb.pitch;
|
||||||
WY = R_WY;
|
WY = R_WY;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_refreshline(void)
|
void lcd_refreshline(void)
|
||||||
{
|
{
|
||||||
if (!fb.enabled) return;
|
if (!fb.enabled) return;
|
||||||
if(!insync) {
|
if(!insync) {
|
||||||
if(R_LY!=0)
|
if(R_LY!=0)
|
||||||
return;
|
return;
|
||||||
else
|
else
|
||||||
insync=1;
|
insync=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(R_LCDC & 0x80))
|
if (!(R_LCDC & 0x80))
|
||||||
return; /* should not happen... */
|
return; /* should not happen... */
|
||||||
|
|
||||||
|
#if LCD_HEIGHT < 144
|
||||||
|
if ( (fb.mode==0&&(R_LY >= 128)) ||
|
||||||
|
(fb.mode==1&&(R_LY < 16)) ||
|
||||||
|
(fb.mode==2&&(R_LY<8||R_LY>=136)) ||
|
||||||
|
(fb.mode==3&&((R_LY%9)==8))
|
||||||
|
|
||||||
if ( (fb.mode==0&&(R_LY >= 128)) ||
|
|
||||||
(fb.mode==1&&(R_LY < 16)) ||
|
|
||||||
(fb.mode==2&&(R_LY<8||R_LY>=136)) ||
|
|
||||||
(fb.mode==3&&((R_LY%9)==8))
|
|
||||||
|
|
||||||
#if LCD_HEIGHT == 64
|
#if LCD_HEIGHT == 64
|
||||||
|| (R_LY & 1) /* calculate only even lines */
|
|| (R_LY & 1) /* calculate only even lines */
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
return;
|
||||||
#endif
|
#endif
|
||||||
)
|
|
||||||
return;
|
|
||||||
|
|
||||||
updatepatpix();
|
updatepatpix();
|
||||||
|
|
||||||
L = R_LY;
|
L = R_LY;
|
||||||
X = R_SCX;
|
X = R_SCX;
|
||||||
|
|
@ -901,25 +903,25 @@ void lcd_refreshline(void)
|
||||||
recolor(BUF+WX, 0x04, 160-WX);
|
recolor(BUF+WX, 0x04, 160-WX);
|
||||||
}
|
}
|
||||||
spr_scan();
|
spr_scan();
|
||||||
#if LCD_DEPTH == 2
|
#if LCD_DEPTH == 1
|
||||||
if (scanline_ind == 3)
|
|
||||||
#else
|
|
||||||
if (scanline_ind == 7)
|
if (scanline_ind == 7)
|
||||||
|
#elif LCD_DEPTH == 2
|
||||||
|
if (scanline_ind == 3)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if LCD_HEIGHT < 144
|
||||||
if(fb.mode!=3)
|
if(fb.mode!=3)
|
||||||
vid_update(L);
|
vid_update(L);
|
||||||
else
|
else
|
||||||
vid_update(L-((int)(L/9)));
|
vid_update(L-((int)(L/9)));
|
||||||
}
|
|
||||||
#if LCD_HEIGHT == 64
|
|
||||||
scanline_ind = (scanline_ind+1) % 8;
|
|
||||||
#else
|
#else
|
||||||
#if LCD_DEPTH == 2
|
vid_update(L);
|
||||||
scanline_ind = (scanline_ind+1) % 4;
|
|
||||||
#else
|
|
||||||
scanline_ind = (scanline_ind+1) % 8;
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
#if LCD_DEPTH == 1
|
||||||
|
scanline_ind = (scanline_ind+1) % 8;
|
||||||
|
#elif LCD_DEPTH == 2
|
||||||
|
scanline_ind = (scanline_ind+1) % 4;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,11 @@ int gnuboy_main(char *rom)
|
||||||
PUTS("Emu reset");
|
PUTS("Emu reset");
|
||||||
emu_reset();
|
emu_reset();
|
||||||
PUTS("Emu run");
|
PUTS("Emu run");
|
||||||
|
#if (LCD_HEIGHT > 144) || (LCD_WIDTH > 160)
|
||||||
|
rb->lcd_clear_display();
|
||||||
|
rb->lcd_drawrect((LCD_WIDTH-160)/2-1, (LCD_HEIGHT-144)/2-1, 162, 146);
|
||||||
|
rb->lcd_update();
|
||||||
|
#endif
|
||||||
emu_run();
|
emu_run();
|
||||||
|
|
||||||
// never reached
|
// never reached
|
||||||
|
|
|
||||||
|
|
@ -36,12 +36,9 @@ rcvar_t vid_exports[] =
|
||||||
};
|
};
|
||||||
|
|
||||||
struct fb fb;
|
struct fb fb;
|
||||||
byte *video_base_buf;
|
|
||||||
|
|
||||||
extern int debug_trace;
|
extern int debug_trace;
|
||||||
|
|
||||||
static byte frameb[145][160];
|
|
||||||
|
|
||||||
void vid_settitle(char *title)
|
void vid_settitle(char *title)
|
||||||
{
|
{
|
||||||
rb->splash(HZ*2, true, title);
|
rb->splash(HZ*2, true, title);
|
||||||
|
|
@ -124,7 +121,7 @@ void ev_poll(void)
|
||||||
ev_postevent(&ev);
|
ev_postevent(&ev);
|
||||||
}
|
}
|
||||||
if(pressed & ROCKBOY_MENU) {
|
if(pressed & ROCKBOY_MENU) {
|
||||||
#if CONFIG_KEYPAD == IRIVER_H100_PAD
|
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
|
||||||
if (do_user_menu() == USER_MENU_QUIT)
|
if (do_user_menu() == USER_MENU_QUIT)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
@ -156,38 +153,32 @@ void vid_init(void)
|
||||||
fb.pitch=160;
|
fb.pitch=160;
|
||||||
fb.enabled=1;
|
fb.enabled=1;
|
||||||
fb.dirty=0;
|
fb.dirty=0;
|
||||||
video_base_buf=fb.ptr=(byte *)frameb;
|
|
||||||
fb.mode=3;
|
fb.mode=3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_LCD_COLOR
|
||||||
|
static const fb_data my_pal[4] = {
|
||||||
|
LCD_WHITE, LCD_LIGHTGRAY, LCD_DARKGRAY, LCD_BLACK
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
void vid_update(int scanline)
|
void vid_update(int scanline)
|
||||||
{
|
{
|
||||||
int cnt=0,scanline_remapped;
|
int cnt=0,scanline_remapped;
|
||||||
byte *frameb;
|
fb_data *frameb;
|
||||||
#if LCD_HEIGHT == 64 /* Archos */
|
#if (LCD_HEIGHT == 64) && (LCD_DEPTH == 1) /* Archos */
|
||||||
int balance = 0;
|
int balance = 0;
|
||||||
if (fb.mode==1)
|
if (fb.mode==1)
|
||||||
scanline-=16;
|
scanline-=16;
|
||||||
else if (fb.mode==2)
|
else if (fb.mode==2)
|
||||||
scanline-=8;
|
scanline-=8;
|
||||||
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) {
|
||||||
balance += LCD_WIDTH;
|
balance += LCD_WIDTH;
|
||||||
if (balance > 0)
|
if (balance > 0)
|
||||||
{
|
{
|
||||||
#ifdef SIMULATOR /* simulator uses C */
|
#if (CONFIG_CPU == SH7034) && !defined(SIMULATOR)
|
||||||
register unsigned scrbyte = 0;
|
|
||||||
if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01;
|
|
||||||
if (scan.buf[1][cnt] & 0x02) scrbyte |= 0x02;
|
|
||||||
if (scan.buf[2][cnt] & 0x02) scrbyte |= 0x04;
|
|
||||||
if (scan.buf[3][cnt] & 0x02) scrbyte |= 0x08;
|
|
||||||
if (scan.buf[4][cnt] & 0x02) scrbyte |= 0x10;
|
|
||||||
if (scan.buf[5][cnt] & 0x02) scrbyte |= 0x20;
|
|
||||||
if (scan.buf[6][cnt] & 0x02) scrbyte |= 0x40;
|
|
||||||
if (scan.buf[7][cnt] & 0x02) scrbyte |= 0x80;
|
|
||||||
*(frameb++) = scrbyte;
|
|
||||||
#else
|
|
||||||
asm volatile (
|
asm volatile (
|
||||||
"mov.b @%0,r0 \n"
|
"mov.b @%0,r0 \n"
|
||||||
"add %1,%0 \n"
|
"add %1,%0 \n"
|
||||||
|
|
@ -234,25 +225,31 @@ void vid_update(int scanline)
|
||||||
: /* clobbers */
|
: /* clobbers */
|
||||||
"r0", "r1"
|
"r0", "r1"
|
||||||
);
|
);
|
||||||
|
#else
|
||||||
|
register unsigned scrbyte = 0;
|
||||||
|
if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01;
|
||||||
|
if (scan.buf[1][cnt] & 0x02) scrbyte |= 0x02;
|
||||||
|
if (scan.buf[2][cnt] & 0x02) scrbyte |= 0x04;
|
||||||
|
if (scan.buf[3][cnt] & 0x02) scrbyte |= 0x08;
|
||||||
|
if (scan.buf[4][cnt] & 0x02) scrbyte |= 0x10;
|
||||||
|
if (scan.buf[5][cnt] & 0x02) scrbyte |= 0x20;
|
||||||
|
if (scan.buf[6][cnt] & 0x02) scrbyte |= 0x40;
|
||||||
|
if (scan.buf[7][cnt] & 0x02) scrbyte |= 0x80;
|
||||||
|
*(frameb++) = scrbyte;
|
||||||
#endif
|
#endif
|
||||||
balance -= 160;
|
balance -= 160;
|
||||||
}
|
}
|
||||||
cnt ++;
|
cnt ++;
|
||||||
}
|
}
|
||||||
rb->lcd_update_rect(0, (scanline/2) & ~7, LCD_WIDTH, 8);
|
rb->lcd_update_rect(0, (scanline/2) & ~7, LCD_WIDTH, 8);
|
||||||
#else /* LCD_HEIGHT != 64, iRiver */
|
#elif (LCD_HEIGHT == 128) && (LCD_DEPTH == 2) /* iriver H1x0 */
|
||||||
if (fb.mode==1)
|
if (fb.mode==1)
|
||||||
scanline-=16;
|
scanline-=16;
|
||||||
else if (fb.mode==2)
|
else if (fb.mode==2)
|
||||||
scanline-=8;
|
scanline-=8;
|
||||||
#if LCD_DEPTH == 2
|
|
||||||
scanline_remapped = scanline / 4;
|
scanline_remapped = scanline / 4;
|
||||||
#else
|
|
||||||
scanline_remapped = scanline / 8;
|
|
||||||
#endif
|
|
||||||
frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH;
|
frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH;
|
||||||
while (cnt < 160) {
|
while (cnt < 160) {
|
||||||
#if LCD_DEPTH == 2
|
|
||||||
*(frameb++) = (scan.buf[0][cnt]&0x3) |
|
*(frameb++) = (scan.buf[0][cnt]&0x3) |
|
||||||
((scan.buf[1][cnt]&0x3)<<2) |
|
((scan.buf[1][cnt]&0x3)<<2) |
|
||||||
((scan.buf[2][cnt]&0x3)<<4) |
|
((scan.buf[2][cnt]&0x3)<<4) |
|
||||||
|
|
@ -260,21 +257,12 @@ void vid_update(int scanline)
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
rb->lcd_update_rect(0, scanline & ~3, LCD_WIDTH, 4);
|
rb->lcd_update_rect(0, scanline & ~3, LCD_WIDTH, 4);
|
||||||
#else
|
#elif (LCD_HEIGHT >= 144) && defined(HAVE_LCD_COLOR) /* iriver H3x0, colour iPod */
|
||||||
register unsigned scrbyte = 0;
|
scanline_remapped = scanline + (LCD_HEIGHT-144)/2;
|
||||||
if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01;
|
frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH + (LCD_WIDTH-160)/2;
|
||||||
if (scan.buf[1][cnt] & 0x02) scrbyte |= 0x02;
|
while (cnt < 160)
|
||||||
if (scan.buf[2][cnt] & 0x02) scrbyte |= 0x04;
|
*frameb++ = my_pal[scan.buf[0][cnt++]&0x3];
|
||||||
if (scan.buf[3][cnt] & 0x02) scrbyte |= 0x08;
|
rb->lcd_update_rect((LCD_WIDTH-160)/2, scanline_remapped, 160, 1);
|
||||||
if (scan.buf[4][cnt] & 0x02) scrbyte |= 0x10;
|
|
||||||
if (scan.buf[5][cnt] & 0x02) scrbyte |= 0x20;
|
|
||||||
if (scan.buf[6][cnt] & 0x02) scrbyte |= 0x40;
|
|
||||||
if (scan.buf[7][cnt] & 0x02) scrbyte |= 0x80;
|
|
||||||
*(frameb++) = scrbyte;
|
|
||||||
cnt++;
|
|
||||||
}
|
|
||||||
rb->lcd_update_rect(0, scanline & ~7, LCD_WIDTH, 8);
|
|
||||||
#endif /* LCD_DEPTH */
|
|
||||||
#endif /* LCD_HEIGHT */
|
#endif /* LCD_HEIGHT */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue