src/mess/drivers/mz2500.c
| r8943 | r8944 | |
| 44 | 44 | static UINT8 cg_reg_index; |
| 45 | 45 | static UINT8 cg_reg[0x20]; |
| 46 | 46 | static UINT8 clut16[0x10]; |
| 47 | static UINT16 clut256[0x100]; |
| 47 | 48 | |
| 48 | 49 | #define WRAM_RESET 0 |
| 49 | 50 | #define IPL_RESET 1 |
| r8943 | r8944 | |
| 323 | 324 | for(pen_i=0;pen_i<8;pen_i++) |
| 324 | 325 | pen |= pen_bit[pen_i]; |
| 325 | 326 | |
| 326 | | if(pen) |
| 327 | | *BITMAP_ADDR16(bitmap, y, x+xi) = machine->pens[pen+0x100]; |
| 327 | if(pen != 0 || clut256[pen] & 0x100) |
| 328 | *BITMAP_ADDR16(bitmap, y, x+xi) = machine->pens[(clut256[pen] & 0xff)+0x100]; |
| 328 | 329 | } |
| 329 | 330 | count++; |
| 330 | 331 | } |
| r8943 | r8944 | |
| 640 | 641 | ---- xxxx clut number |
| 641 | 642 | */ |
| 642 | 643 | clut16[text_reg_index & 0xf] = data & 0x1f; |
| 644 | |
| 645 | { |
| 646 | int i; |
| 647 | |
| 648 | for(i=0;i<0x10;i++) |
| 649 | { |
| 650 | clut256[(text_reg_index & 0xf) | (i << 4)] = (((data & 0x1f) << 4) | i); |
| 651 | } |
| 652 | } |
| 643 | 653 | } |
| 644 | 654 | //printf("[%02x]<- %02x\n",text_reg[text_reg_index],text_reg_index); |
| 645 | 655 | break; |
| r8943 | r8944 | |
| 1442 | 1452 | |
| 1443 | 1453 | static WRITE_LINE_DEVICE_HANDLER( pit8253_clk1_irq ) |
| 1444 | 1454 | { |
| 1445 | | if(state) |
| 1446 | | if(irq_mask[1]) |
| 1447 | | cputag_set_input_line_and_vector(device->machine, "maincpu", 0, HOLD_LINE,irq_vector[1]); |
| 1455 | if(irq_mask[1]) |
| 1456 | cputag_set_input_line_and_vector(device->machine, "maincpu", 0, HOLD_LINE,irq_vector[1]); |
| 1448 | 1457 | } |
| 1449 | 1458 | |
| 1450 | 1459 | static const struct pit8253_config mz2500_pit8253_intf = |