summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2011-08-22 00:00:11 +0000
committer Angelo Salese <angelosa@users.noreply.github.com>2011-08-22 00:00:11 +0000
commit9992d37bdfc95cb4ef227da943fb799b5c096234 (patch)
tree6601868f152cc1118f7c1f81d637612c6c49e611 /src/mame/video
parent7e95ef4027c266ff73c6a4feac1e8786dd8e7c5e (diff)
Implemented 4bpp mode for object RAM, used by Densya de Go 2X credit display
Diffstat (limited to 'src/mame/video')
-rw-r--r--src/mame/video/taitojc.c52
1 files changed, 42 insertions, 10 deletions
diff --git a/src/mame/video/taitojc.c b/src/mame/video/taitojc.c
index f72bfea660c..741da0f20f9 100644
--- a/src/mame/video/taitojc.c
+++ b/src/mame/video/taitojc.c
@@ -77,6 +77,7 @@ WRITE32_HANDLER(taitojc_char_w)
// 0x00: -------- -------- ------xx xxxxxxxx X
// 0x01: ---xxxxx xx------ -------- -------- Palette
// 0x01: -------- --x----- -------- -------- Priority (0 = below 3D, 1 = above 3D)
+// 0x01: -------- -------x -------- -------- Color depth (0) 4bpp / (1) 8bpp
// 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;
UINT32 address;
UINT8 *v;
+ UINT8 color_depth;
+
+ color_depth = (w2 & 0x10000) >> 16;
address = (w2 & 0x7fff) * 0x20;
if (w2 & 0x4000)
@@ -163,22 +167,50 @@ static void draw_object(running_machine &machine, bitmap_t *bitmap, const rectan
y2 = cliprect->max_y;
}
- for (j=y1; j < y2; j++)
+ if(!color_depth) // Densya de Go 2X "credit text", 4bpp
{
- UINT16 *d = BITMAP_ADDR16(bitmap, j, 0);
- int index = (iy * width) + ix;
-
- for (i=x1; i < x2; i++)
+ for (j=y1; j < y2; j++)
{
- UINT8 pen = v[BYTE4_XOR_BE(index)];
- if (pen != 0)
+ UINT16 *d = BITMAP_ADDR16(bitmap, j, 0);
+ int index = (iy * (width / 2)) + ix;
+
+ for (i=x1; i < x2; i+=2)
{
- d[i] = palette + pen;
+ 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++;
}
- index++;
+
+ iy++;
}
+ }
+ else // 8bpp
+ {
+ for (j=y1; j < y2; j++)
+ {
+ UINT16 *d = BITMAP_ADDR16(bitmap, j, 0);
+ int index = (iy * width) + ix;
+
+ for (i=x1; i < x2; i++)
+ {
+ UINT8 pen = v[BYTE4_XOR_BE(index)];
+ if (pen != 0)
+ {
+ d[i] = palette + pen;
+ }
+ index++;
+ }
- iy++;
+ iy++;
+ }
}
}