mirror of
https://github.com/holub/mame
synced 2025-07-04 09:28:51 +03:00
psi98: Add gfx mode rendering, fix vsync timer, update some clocks
This commit is contained in:
parent
a83ac2582f
commit
90001edb09
@ -247,11 +247,10 @@ MC6845_UPDATE_ROW( kdt6_state::crtc_update_row )
|
||||
|
||||
for (int i = 0; i < x_count; i++)
|
||||
{
|
||||
uint16_t code = m_vram[((m_status1 & 0x03) << 14) | (ma + i)];
|
||||
|
||||
if (BIT(m_status1, 6))
|
||||
{
|
||||
// text mode
|
||||
uint16_t code = m_vram[((m_status1 & 0x03) << 14) | (ma + i)];
|
||||
uint8_t data = m_gfx[((code & 0xff) << 4) | ra];
|
||||
|
||||
int inverse = BIT(code, 8) | BIT(m_status1, 5) | ((i == cursor_x) ? 1 : 0);
|
||||
@ -267,6 +266,11 @@ MC6845_UPDATE_ROW( kdt6_state::crtc_update_row )
|
||||
else
|
||||
{
|
||||
// gfx mode
|
||||
uint8_t data = m_vram[(ma << 4) | (ra << 6) | i];
|
||||
|
||||
// draw 8 pixels of the cell
|
||||
for (int x = 0; x < 8; x++)
|
||||
bitmap.pix32(y, x + i*8) = pen[BIT(data, 7 - x)];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -351,7 +355,8 @@ WRITE8_MEMBER( kdt6_state::mapper_w )
|
||||
m_page_r[offset]->set_base(addr < 0x40000 ? &m_ram[addr] : &m_dummy_r[0]);
|
||||
m_page_w[offset]->set_base(addr < 0x40000 ? &m_ram[addr] : &m_dummy_w[0]);
|
||||
|
||||
logerror("map_page: %x -> %06x\n", offset, addr);
|
||||
if (0)
|
||||
logerror("map_page: %x -> %06x\n", offset, addr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -511,20 +516,21 @@ static MACHINE_CONFIG_START( psi98 )
|
||||
MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("ctc1", z80ctc_device, trg1))
|
||||
MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("ctc1", z80ctc_device, trg2))
|
||||
|
||||
MCFG_DEVICE_ADD("ctc1", Z80CTC, XTAL_16MHz / 8)
|
||||
MCFG_DEVICE_ADD("ctc1", Z80CTC, XTAL_16MHz / 4)
|
||||
MCFG_Z80CTC_INTR_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
|
||||
MCFG_Z80CTC_ZC1_CB(DEVWRITELINE("sio", z80sio_device, rxtxcb_w))
|
||||
MCFG_Z80CTC_ZC2_CB(DEVWRITELINE("sio", z80sio_device, rxca_w))
|
||||
MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("sio", z80sio_device, txca_w))
|
||||
|
||||
MCFG_DEVICE_ADD("ctc2", Z80CTC, XTAL_16MHz / 8)
|
||||
MCFG_DEVICE_ADD("ctc2", Z80CTC, XTAL_16MHz / 4)
|
||||
MCFG_Z80CTC_INTR_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
|
||||
MCFG_Z80CTC_ZC2_CB(DEVWRITELINE("ctc2", z80ctc_device, trg3))
|
||||
|
||||
MCFG_Z80SIO_ADD("sio", XTAL_16MHz / 8, 0, 0, 0, 0)
|
||||
MCFG_Z80SIO_ADD("sio", XTAL_16MHz / 4, 0, 0, 0, 0)
|
||||
MCFG_Z80SIO_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
|
||||
MCFG_Z80SIO_OUT_TXDB_CB(DEVWRITELINE("kbd", psi_keyboard_bus_device, tx_w))
|
||||
|
||||
MCFG_DEVICE_ADD("pio", Z80PIO, XTAL_16MHz / 8)
|
||||
MCFG_DEVICE_ADD("pio", Z80PIO, XTAL_16MHz / 4)
|
||||
MCFG_Z80PIO_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
|
||||
|
||||
MCFG_UPD765A_ADD("fdc", true, true)
|
||||
|
Loading…
Reference in New Issue
Block a user