Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opcodes $60FF, $61FF, $F518 #64

Open
dirkwhoffmann opened this issue Jan 4, 2020 · 0 comments
Open

Opcodes $60FF, $61FF, $F518 #64

dirkwhoffmann opened this issue Jan 4, 2020 · 0 comments

Comments

@dirkwhoffmann
Copy link

More findings:

  • Opcode $60FF:

    In 68000 mode, opcode $60FF disassembles to ILLEGAL, because this bit bittern marks the BRA 32-bit-displacement instruction on the 68020+. On the 68000/68010, it should execute a BRA with a byte-displacement of $FF, I think.

The emulation code does the right thing. Hence, only the disassembler output is wrong.

static void m68k_op_bra_32(void)
{
	if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))
	{
	...
	}
	else
	{
		m68ki_trace_t0();				   /* auto-disable (see m68kcpu.h) */
		m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));
		if(REG_PC == REG_PPC)
			USE_ALL_CYCLES();
	}
}
  • Opcode $61FF: Same as $60FF, just for BSR.

  • Opcode $f518: (PFLUSH on 68040+)

static void m68k_op_pflush_32(void)
{
	if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))
	{
		// Nothing to do, unless address translation cache is emulated
		return;
	}
         m68ki_exception_illegal();
}

On models 68030-, this opcode should trigger a line F exception (m68ki_exception_1111), not an illegal exception (m68ki_exception_illegal).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant