Previous 15994 Revisions Next

r8944 Sunday 29th August, 2010 at 22:51:54 UTC by Angelo Salese
[MZ-2500]: Added 256 clut, fixes Hover Attack bitmap-based chars
[src/mess/drivers]mz2500.c

src/mess/drivers/mz2500.c
r8943r8944
4444static UINT8 cg_reg_index;
4545static UINT8 cg_reg[0x20];
4646static UINT8 clut16[0x10];
47static UINT16 clut256[0x100];
4748
4849#define WRAM_RESET 0
4950#define IPL_RESET 1
r8943r8944
323324            for(pen_i=0;pen_i<8;pen_i++)
324325               pen |= pen_bit[pen_i];
325326
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];
328329         }
329330         count++;
330331      }
r8943r8944
640641            ---- xxxx clut number
641642            */
642643            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            }
643653         }
644654         //printf("[%02x]<- %02x\n",text_reg[text_reg_index],text_reg_index);
645655         break;
r8943r8944
14421452
14431453static WRITE_LINE_DEVICE_HANDLER( pit8253_clk1_irq )
14441454{
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]);
14481457}
14491458
14501459static const struct pit8253_config mz2500_pit8253_intf =

Previous 15994 Revisions Next


© 1998-2018 The MESS Team