diff options
author | Dirk Best <mail@dirk-best.de> | 2017-08-14 00:18:33 +0200 |
---|---|---|
committer | Dirk Best <mail@dirk-best.de> | 2017-08-14 00:19:14 +0200 |
commit | 90001edb093b2561aa254d7856545c4fc4a1657c (patch) | |
tree | a2e3f7dff6c5b66347447e5660fa055988d27a78 /src/mame/drivers/kdt6.cpp | |
parent | a83ac2582f3d0f70831e9af96e385a98d772c1bf (diff) |
psi98: Add gfx mode rendering, fix vsync timer, update some clocks
Diffstat (limited to 'src/mame/drivers/kdt6.cpp')
-rw-r--r-- | src/mame/drivers/kdt6.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/mame/drivers/kdt6.cpp b/src/mame/drivers/kdt6.cpp index 2c0399b8353..cbb65dbca1b 100644 --- a/src/mame/drivers/kdt6.cpp +++ b/src/mame/drivers/kdt6.cpp @@ -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) |