src/mess/video/mz700.c
| r2050 | r2051 | |
| 25 | 25 | { |
| 26 | 26 | int i; |
| 27 | 27 | |
| 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++) |
| 29 | 34 | { |
| 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); |
| 31 | 37 | } |
| 32 | 38 | } |
| 33 | 39 | |
| 34 | 40 | |
| 35 | 41 | VIDEO_UPDATE( mz700 ) |
| 36 | 42 | { |
| 37 | | int offs; |
| 43 | int offs; |
| 38 | 44 | |
| 39 | | fillbitmap(bitmap, get_black_pen(screen->machine), cliprect); |
| 45 | fillbitmap(bitmap, get_black_pen(screen->machine), cliprect); |
| 40 | 46 | |
| 41 | 47 | for(offs = 0; offs < 40*25; offs++) |
| 42 | 48 | { |
| 43 | 49 | int sx, sy, code, color; |
| 44 | | |
| 45 | | sy = (offs / 40) * 8; |
| 50 | sy = (offs / 40) * 8; |
| 46 | 51 | sx = (offs % 40) * 8; |
| 47 | | code = videoram[offs]; |
| 48 | 52 | 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); |
| 53 | 55 | } |
| 54 | 56 | |
| 55 | 57 | return 0; |