diff --git a/src/mess/drivers/bigbord2.c b/src/mess/drivers/bigbord2.c index 2869bbc34ca..bce19e521b8 100644 --- a/src/mess/drivers/bigbord2.c +++ b/src/mess/drivers/bigbord2.c @@ -175,22 +175,24 @@ READ8_MEMBER( bigbord2_state::portd0_r ) WRITE8_MEMBER( bigbord2_state::bigbord2_kbd_put ) { + address_space &mem = *m_maincpu->space(AS_PROGRAM); + if (data) { m_term_data = data; m_term_status = 8; m_ctca->trg0(0); m_ctca->trg0(1); - if (space.read_byte(0xf13d) == 0x4d) + if (mem.read_byte(0xf13d) == 0x4d) { // simulate interrupt by saving current pc on // the stack and jumping to interrupt handler. UINT16 spreg = m_maincpu->state_int(Z80_SP); UINT16 pcreg = m_maincpu->state_int(Z80_PC); spreg--; - space.write_byte(spreg, pcreg >> 8); + mem.write_byte(spreg, pcreg >> 8); spreg--; - space.write_byte(spreg, pcreg); + mem.write_byte(spreg, pcreg); m_maincpu->set_state_int(Z80_SP, spreg); m_maincpu->set_state_int(Z80_PC, 0xF120); } diff --git a/src/mess/drivers/p8k.c b/src/mess/drivers/p8k.c index b4b7a728277..075b07dc857 100644 --- a/src/mess/drivers/p8k.c +++ b/src/mess/drivers/p8k.c @@ -175,6 +175,7 @@ WRITE8_MEMBER( p8k_state::p8k_port24_w ) WRITE8_MEMBER( p8k_state::kbd_put ) { + address_space &mem = *m_maincpu->space(AS_PROGRAM); m_term_data = data; // This is a dreadful hack.. // simulate interrupt by saving current pc on @@ -182,9 +183,9 @@ WRITE8_MEMBER( p8k_state::kbd_put ) UINT16 spreg = m_maincpu->state_int(Z80_SP); UINT16 pcreg = m_maincpu->state_int(Z80_PC); spreg--; - space.write_byte(spreg, pcreg >> 8); + mem.write_byte(spreg, pcreg >> 8); spreg--; - space.write_byte(spreg, pcreg); + mem.write_byte(spreg, pcreg); m_maincpu->set_state_int(Z80_SP, spreg); m_maincpu->set_state_int(Z80_PC, 0x078A); } @@ -438,13 +439,14 @@ DRIVER_INIT_MEMBER(p8k_state,p8k) WRITE8_MEMBER( p8k_state::kbd_put_16 ) { + address_space &mem = *m_maincpu->space(AS_PROGRAM); // keyboard int handler is at 0x0700 m_term_data = data; // This is another dire hack.. - UINT8 offs = space.read_byte(0x43a5); + UINT8 offs = mem.read_byte(0x43a5); UINT16 addr = 0x41b0 + (UINT16) offs; - space.write_byte(addr, data); - space.write_byte(0x43a0, 1); + mem.write_byte(addr, data); + mem.write_byte(0x43a0, 1); } static GENERIC_TERMINAL_INTERFACE( terminal_intf_16 )