diff options
Diffstat (limited to 'src/devices/bus/ti99/peb/pcode.cpp')
-rw-r--r-- | src/devices/bus/ti99/peb/pcode.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/devices/bus/ti99/peb/pcode.cpp b/src/devices/bus/ti99/peb/pcode.cpp index 4e09b5a4739..d30622f6a41 100644 --- a/src/devices/bus/ti99/peb/pcode.cpp +++ b/src/devices/bus/ti99/peb/pcode.cpp @@ -103,6 +103,7 @@ ti_pcode_card_device::ti_pcode_card_device(const machine_config &mconfig, const device_t(mconfig, TI99_P_CODE, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_rom(nullptr), + m_crulatch(*this, "crulatch"), m_bank_select(0), m_active(false), m_clock_count(0), @@ -254,18 +255,18 @@ READ8Z_MEMBER(ti_pcode_card_device::crureadz) WRITE8_MEMBER(ti_pcode_card_device::cruwrite) { if ((offset & 0xff00)==CRU_BASE) - { - int addr = offset & 0x00ff; + m_crulatch->write_bit((offset & 0x80) >> 5 | (offset & 0x06) >> 1, data); +} - if (addr==0) - m_selected = (data != 0); +WRITE_LINE_MEMBER(ti_pcode_card_device::pcpage_w) +{ + m_selected = state; +} - if (addr==0x80) // Bit 4 is on address line 8 - { - m_bank_select = (data+1); // we're calling this bank 1 and bank 2 - if (TRACE_CRU) logerror("Select rom bank %d\n", m_bank_select); - } - } +WRITE_LINE_MEMBER(ti_pcode_card_device::ekrpg_w) +{ + m_bank_select = state ? 2 : 1; // we're calling this bank 1 and bank 2 + if (TRACE_CRU) logerror("Select rom bank %d\n", m_bank_select); } void ti_pcode_card_device::device_start() @@ -361,6 +362,10 @@ MACHINE_CONFIG_MEMBER( ti_pcode_card_device::device_add_mconfig ) MCFG_GROM_ADD( PGROM5_TAG, 5, PCODE_GROM_TAG, 0xa000, WRITELINE(ti_pcode_card_device, ready_line)) MCFG_GROM_ADD( PGROM6_TAG, 6, PCODE_GROM_TAG, 0xc000, WRITELINE(ti_pcode_card_device, ready_line)) MCFG_GROM_ADD( PGROM7_TAG, 7, PCODE_GROM_TAG, 0xe000, WRITELINE(ti_pcode_card_device, ready_line)) + + MCFG_DEVICE_ADD("crulatch", LS259, 0) // U12 + MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(ti_pcode_card_device, pcpage_w)) + MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(ti_pcode_card_device, ekrpg_w)) MACHINE_CONFIG_END const tiny_rom_entry *ti_pcode_card_device::device_rom_region() const |