diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp index 9e0fec6b487..7799dff84d5 100644 --- a/src/devices/cpu/z80/z80.cpp +++ b/src/devices/cpu/z80/z80.cpp @@ -3126,6 +3126,8 @@ OP(op,ff) { rst(0x38); void z80_device::take_nmi() { + PRVPC = 0xffff; // HACK: segag80r protection kludge + /* Check if processor was halted */ leave_halt(); @@ -3146,6 +3148,8 @@ void z80_device::take_interrupt() { int irq_vector; + PRVPC = 0xffff; // HACK: segag80r protection kludge + /* Check if processor was halted */ leave_halt(); @@ -3230,6 +3234,8 @@ void z80_device::take_interrupt() void nsc800_device::take_interrupt_nsc800() { + PRVPC = 0xffff; // HACK: segag80r protection kludge + /* Check if processor was halted */ leave_halt(); diff --git a/src/mame/drivers/segag80r.cpp b/src/mame/drivers/segag80r.cpp index f278a775a67..d374bc6d561 100644 --- a/src/mame/drivers/segag80r.cpp +++ b/src/mame/drivers/segag80r.cpp @@ -172,8 +172,8 @@ offs_t segag80r_state::decrypt_offset(address_space &space, offs_t offset) if ((uint16_t)pc == 0xffff || space.read_byte(pc) != 0x32) return offset; - /* fetch the low byte of the address and munge it */ - return (offset & 0xff00) | (*m_decrypt)(pc, space.read_byte(pc + 1)); + /* munge the low byte of the address */ + return (offset & 0xff00) | (*m_decrypt)(pc, offset & 0xff); } WRITE8_MEMBER(segag80r_state::mainram_w)