Previous 15994 Revisions Next

r2051 Saturday 22nd March, 2008 at 01:17:31 UTC by Robbbert
[MZ700] Fixed palette (bug 1537).
[src/mess/drivers]mz700.c
[src/mess/video]mz700.c

src/mess/video/mz700.c
r2050r2051
2525{
2626   int i;
2727
28    for (i = 0; i < 8; i++)
28   machine->colortable = colortable_alloc(machine, 8);
29
30   for (i = 0; i < 8; i++)
31      colortable_palette_set_color(machine->colortable, i, MAKE_RGB((i & 2) ? 0xff : 0x00, (i & 4) ? 0xff : 0x00, (i & 1) ? 0xff : 0x00));
32   
33   for (i = 0; i < 256; i++)
2934   {
30      palette_set_color_rgb(machine, i, (i & 2) ? 0xff : 0x00, (i & 4) ? 0xff : 0x00, (i & 1) ? 0xff : 0x00);
35      colortable_entry_set_value(machine->colortable, i*2, i & 7);
36           colortable_entry_set_value(machine->colortable, i*2+1, (i >> 4) & 7);
3137   }
3238}
3339
3440
3541VIDEO_UPDATE( mz700 )
3642{
37    int offs;
43   int offs;
3844
39    fillbitmap(bitmap, get_black_pen(screen->machine), cliprect);
45   fillbitmap(bitmap, get_black_pen(screen->machine), cliprect);
4046
4147   for(offs = 0; offs < 40*25; offs++)
4248   {
4349      int sx, sy, code, color;
44
45        sy = (offs / 40) * 8;
50           sy = (offs / 40) * 8;
4651      sx = (offs % 40) * 8;
47      code = videoram[offs];
4852      color = colorram[offs];
49      code |= (color & 0x80) << 1;
50
51        drawgfx(bitmap, screen->machine->gfx[0], code, color, 0, 0, sx, sy,
52         cliprect, TRANSPARENCY_NONE, 0);
53      code = videoram[offs] | (color & 0x80) << 1;
54      drawgfx(bitmap, screen->machine->gfx[0], code, color, 0, 0, sx, sy, cliprect, TRANSPARENCY_NONE, 0);
5355   }
5456
5557   return 0;
src/mess/drivers/mz700.c
r2050r2051
264264   MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8 - 1, 0*8, 25*8 - 1)
265265
266266   MDRV_GFXDECODE(mz700)
267   MDRV_PALETTE_LENGTH(8)
267   MDRV_PALETTE_LENGTH(256*2)
268268
269269   MDRV_PALETTE_INIT(mz700)
270270   MDRV_VIDEO_UPDATE(mz700)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team