src/mess/drivers/mbee.c
| r1770 | r1771 | |
| 182 | 182 | GFXDECODE_ENTRY( REGION_CPU1, 0xf000, mbee_charlayout, 0, 256 ) |
| 183 | 183 | GFXDECODE_END |
| 184 | 184 | |
| 185 | | static const UINT8 palette[] = |
| 185 | static const UINT8 mbee_palette[] = |
| 186 | 186 | { |
| 187 | 187 | 0x00,0x00,0x00, /* black */ |
| 188 | 188 | 0xf0,0x00,0x00, /* red */ |
| r1770 | r1771 | |
| 220 | 220 | |
| 221 | 221 | static PALETTE_INIT( mbee ) |
| 222 | 222 | { |
| 223 | | palette_set_colors_rgb(machine, 0, palette, sizeof(palette) / 3); |
| 223 | int i; |
| 224 | UINT8 r, b, g; |
| 225 | machine->colortable = colortable_alloc(machine, 32); |
| 226 | |
| 227 | for (i = 0; i < 32; i++) |
| 228 | { |
| 229 | r = mbee_palette[i*3]; |
| 230 | g = mbee_palette[i*3+1]; |
| 231 | b = mbee_palette[i*3+2]; |
| 232 | colortable_palette_set_color(machine->colortable,i,MAKE_RGB(r, g, b)); |
| 233 | } |
| 234 | |
| 235 | for( i = 0; i < 256; i++ ) |
| 236 | { |
| 237 | colortable_entry_set_value(machine->colortable, i*2, i>>5); |
| 238 | colortable_entry_set_value(machine->colortable, i*2+1, i&31); |
| 239 | } |
| 224 | 240 | } |
| 225 | 241 | |
| 226 | 242 | static const struct z80_irq_daisy_chain mbee_daisy_chain[] = |
| r1770 | r1771 | |
| 250 | 266 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 251 | 267 | MDRV_SCREEN_SIZE(70*8, 310) |
| 252 | 268 | MDRV_SCREEN_VISIBLE_AREA(0*8, 70*8-1, 0, 19*16-1) |
| 253 | | MDRV_PALETTE_LENGTH(sizeof(palette)/sizeof(palette[0])/3) |
| 269 | MDRV_PALETTE_LENGTH(256*2) |
| 254 | 270 | MDRV_PALETTE_INIT(mbee) |
| 255 | 271 | |
| 256 | 272 | MDRV_VIDEO_START(mbee) |