It's probably this: set TF bit (0x0100) in eflags causes Debug exception (interrupt 0x01) only at completion of rep movsb (taken from here: https://www.geoffchappell.com/studies/w ... cation.htm ).
Edit: And there's also the fact REP with invalid instruction should just ignore and return pointing to the next instruction, something PCem did before but no longer does.
Code: Select all
if (x86_opcodes_REPNE[(fetchdat & 0xff) | cpu_state.op32])
return x86_opcodes_REPNE[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
Is this correct? Because every element of x86_opcodes_REPNE and x86_opcodes_REPE is xet to at least ILLEGAL, so it's never NULL, therefore that second return never gets executed.