mirror of
https://github.com/holub/mame
synced 2025-05-25 07:15:25 +03:00
Implemented 4bpp mode for object RAM, used by Densya de Go 2X credit display
This commit is contained in:
parent
7e95ef4027
commit
9992d37bdf
@ -77,6 +77,7 @@ WRITE32_HANDLER(taitojc_char_w)
|
|||||||
// 0x00: -------- -------- ------xx xxxxxxxx X
|
// 0x00: -------- -------- ------xx xxxxxxxx X
|
||||||
// 0x01: ---xxxxx xx------ -------- -------- Palette
|
// 0x01: ---xxxxx xx------ -------- -------- Palette
|
||||||
// 0x01: -------- --x----- -------- -------- Priority (0 = below 3D, 1 = above 3D)
|
// 0x01: -------- --x----- -------- -------- Priority (0 = below 3D, 1 = above 3D)
|
||||||
|
// 0x01: -------- -------x -------- -------- Color depth (0) 4bpp / (1) 8bpp
|
||||||
// 0x01: -------- -------- -xxxxxxx xxxxxxxx VRAM data address
|
// 0x01: -------- -------- -xxxxxxx xxxxxxxx VRAM data address
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -105,6 +106,9 @@ static void draw_object(running_machine &machine, bitmap_t *bitmap, const rectan
|
|||||||
int ix, iy;
|
int ix, iy;
|
||||||
UINT32 address;
|
UINT32 address;
|
||||||
UINT8 *v;
|
UINT8 *v;
|
||||||
|
UINT8 color_depth;
|
||||||
|
|
||||||
|
color_depth = (w2 & 0x10000) >> 16;
|
||||||
|
|
||||||
address = (w2 & 0x7fff) * 0x20;
|
address = (w2 & 0x7fff) * 0x20;
|
||||||
if (w2 & 0x4000)
|
if (w2 & 0x4000)
|
||||||
@ -163,6 +167,33 @@ static void draw_object(running_machine &machine, bitmap_t *bitmap, const rectan
|
|||||||
y2 = cliprect->max_y;
|
y2 = cliprect->max_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!color_depth) // Densya de Go 2X "credit text", 4bpp
|
||||||
|
{
|
||||||
|
for (j=y1; j < y2; j++)
|
||||||
|
{
|
||||||
|
UINT16 *d = BITMAP_ADDR16(bitmap, j, 0);
|
||||||
|
int index = (iy * (width / 2)) + ix;
|
||||||
|
|
||||||
|
for (i=x1; i < x2; i+=2)
|
||||||
|
{
|
||||||
|
UINT8 pen = (v[BYTE4_XOR_BE(index)] & 0xf0) >> 4;
|
||||||
|
if (pen != 0)
|
||||||
|
{
|
||||||
|
d[i] = palette + pen;
|
||||||
|
}
|
||||||
|
pen = (v[BYTE4_XOR_BE(index)] & 0x0f);
|
||||||
|
if (pen != 0)
|
||||||
|
{
|
||||||
|
d[i+1] = palette + pen;
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
|
||||||
|
iy++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // 8bpp
|
||||||
|
{
|
||||||
for (j=y1; j < y2; j++)
|
for (j=y1; j < y2; j++)
|
||||||
{
|
{
|
||||||
UINT16 *d = BITMAP_ADDR16(bitmap, j, 0);
|
UINT16 *d = BITMAP_ADDR16(bitmap, j, 0);
|
||||||
@ -180,6 +211,7 @@ static void draw_object(running_machine &machine, bitmap_t *bitmap, const rectan
|
|||||||
|
|
||||||
iy++;
|
iy++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void taitojc_exit(running_machine &machine)
|
static void taitojc_exit(running_machine &machine)
|
||||||
|
Loading…
Reference in New Issue
Block a user