diff --git a/src/emu/cpu/z80/z80.c b/src/emu/cpu/z80/z80.c index 03827959ed9..6054a7f8467 100644 --- a/src/emu/cpu/z80/z80.c +++ b/src/emu/cpu/z80/z80.c @@ -3582,7 +3582,8 @@ static CPU_IMPORT_STATE( z80 ) switch (entry->index) { case Z80_R: - cpustate->rtemp = (cpustate->r & 0x7f) | (cpustate->r2 & 0x80); + cpustate->r = cpustate->rtemp & 0x7f; + cpustate->r2 = cpustate->rtemp & 0x80; break; default: @@ -3599,8 +3600,7 @@ static CPU_EXPORT_STATE( z80 ) switch (entry->index) { case Z80_R: - cpustate->r = cpustate->rtemp & 0x7f; - cpustate->r2 = cpustate->rtemp & 0x80; + cpustate->rtemp = (cpustate->r & 0x7f) | (cpustate->r2 & 0x80); break; default: