diff options
author | Michael Pavone <pavone@retrodev.com> | 2016-04-28 09:00:42 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2016-04-28 09:00:42 -0700 |
commit | 5889c419383e08aa540acbd8dc28fe2ff43ed48c (patch) | |
tree | 0ff37f91183e6c04d179d9aa052931145e69efb2 /m68k_core.c | |
parent | 557a468dcccfc1d1e4ccc067b31f812478236077 (diff) |
Implemented A line and F line traps.
Diffstat (limited to 'm68k_core.c')
-rw-r--r-- | m68k_core.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/m68k_core.c b/m68k_core.c index 16614a7..799102e 100644 --- a/m68k_core.c +++ b/m68k_core.c @@ -334,7 +334,20 @@ void translate_m68k_rtr(m68k_options *opts, m68kinst * inst) void translate_m68k_trap(m68k_options *opts, m68kinst *inst) { code_info *code = &opts->gen.code; - ldi_native(opts, inst->src.params.immed + VECTOR_TRAP_0, opts->gen.scratch2); + uint32_t vector; + switch (inst->op) + { + case M68K_TRAP: + vector = inst->src.params.immed + VECTOR_TRAP_0; + break; + case M68K_A_LINE_TRAP: + vector = VECTOR_LINE_1010; + break; + case M68K_F_LINE_TRAP: + vector = VECTOR_LINE_1111; + break; + } + ldi_native(opts, vector, opts->gen.scratch2); ldi_native(opts, inst->address+2, opts->gen.scratch1); jmp(code, opts->trap); } @@ -818,6 +831,8 @@ impl_info m68k_impls[] = { //traps OP_IMPL(M68K_CHK, translate_m68k_chk), RAW_IMPL(M68K_TRAP, translate_m68k_trap), + RAW_IMPL(M68K_A_LINE_TRAP, translate_m68k_trap), + RAW_IMPL(M68K_F_LINE_TRAP, translate_m68k_trap), RAW_IMPL(M68K_TRAPV, translate_m68k_trapv), RAW_IMPL(M68K_ILLEGAL, translate_m68k_illegal), RAW_IMPL(M68K_INVALID, translate_m68k_illegal), |