diff --git a/src/emu/cpu/m68000/m68000.h b/src/emu/cpu/m68000/m68000.h index b9b181ebc92..544ce0196e7 100644 --- a/src/emu/cpu/m68000/m68000.h +++ b/src/emu/cpu/m68000/m68000.h @@ -789,5 +789,6 @@ extern UINT16 m68k_get_fc(m68000_base_device *device); extern void m68k_set_encrypted_opcode_range(m68000_base_device *device, offs_t start, offs_t end); extern void m68k_set_hmmu_enable(m68000_base_device *device, int enable); extern void m68k_set_instruction_hook(m68000_base_device *device, instruction_hook_t ihook); +extern void m68k_set_buserror_details(m68000_base_device *device, UINT32 fault_addr, UINT8 rw, UINT8 fc); #endif /* __M68000_H__ */ diff --git a/src/emu/cpu/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c index f1ee9e9afa0..42acf54ec3c 100644 --- a/src/emu/cpu/m68000/m68kcpu.c +++ b/src/emu/cpu/m68000/m68kcpu.c @@ -1612,6 +1612,16 @@ void m68k_set_reset_callback(m68000_base_device *device, m68k_reset_func callbac device->reset_instr_callback = callback; } +// fault_addr = address to indicate fault at +// rw = 0 for read, 1 for write +// fc = 3-bit function code of access (usually you'd just put what m68k_get_fc() returns here) +void m68k_set_buserror_details(m68000_base_device *device, UINT32 fault_addr, UINT8 rw, UINT8 fc) +{ + device->aerr_address = fault_addr; + device->aerr_write_mode = rw; + device->aerr_fc = fc; +} + void m68k_set_cmpild_callback(m68000_base_device *device, m68k_cmpild_func callback) { device->cmpild_instr_callback = callback; @@ -1632,9 +1642,6 @@ UINT16 m68k_get_fc(m68000_base_device *device) return device->mmu_tmp_fc; } - - - /**************************************************************************** * State definition ****************************************************************************/