mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
Merge pull request #994 from ajrhacker/dasm_override
Move disasm overrides into interface, reducing driver-debugger depend…
This commit is contained in:
commit
5886ed531e
@ -1631,7 +1631,6 @@ device_debug::device_debug(device_t &device)
|
||||
, m_flags(0)
|
||||
, m_symtable(&device, device.machine().debugger().cpu().get_global_symtable())
|
||||
, m_instrhook(nullptr)
|
||||
, m_dasm_override(nullptr)
|
||||
, m_stepaddr(0)
|
||||
, m_stepsleft(0)
|
||||
, m_stopaddr(0)
|
||||
@ -1984,20 +1983,16 @@ void device_debug::set_instruction_hook(debug_instruction_hook_func hook)
|
||||
|
||||
offs_t device_debug::disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) const
|
||||
{
|
||||
offs_t result = 0;
|
||||
|
||||
// check for disassembler override
|
||||
if (m_dasm_override != nullptr)
|
||||
result = (*m_dasm_override)(m_device, buffer, pc, oprom, opram, 0);
|
||||
if (m_disasm == nullptr)
|
||||
return 0;
|
||||
|
||||
// if we have a disassembler, run it
|
||||
if (result == 0 && m_disasm != nullptr)
|
||||
result = m_disasm->disassemble(buffer, pc, oprom, opram, 0);
|
||||
offs_t result = m_disasm->disassemble(buffer, pc, oprom, opram, 0);
|
||||
|
||||
// make sure we get good results
|
||||
assert((result & DASMFLAG_LENGTHMASK) != 0 || m_disasm == nullptr);
|
||||
assert((result & DASMFLAG_LENGTHMASK) != 0);
|
||||
#ifdef MAME_DEBUG
|
||||
if (m_memory != nullptr && m_disasm != nullptr)
|
||||
if (m_memory != nullptr)
|
||||
{
|
||||
address_space &space = m_memory->space(AS_PROGRAM);
|
||||
int bytes = space.address_to_byte(result & DASMFLAG_LENGTHMASK);
|
||||
|
@ -46,8 +46,6 @@ struct xml_data_node;
|
||||
|
||||
class device_debug
|
||||
{
|
||||
typedef offs_t (*dasm_override_func)(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options);
|
||||
|
||||
public:
|
||||
// breakpoint class
|
||||
class breakpoint
|
||||
@ -186,7 +184,6 @@ public:
|
||||
|
||||
// hooks into our operations
|
||||
void set_instruction_hook(debug_instruction_hook_func hook);
|
||||
void set_dasm_override(dasm_override_func dasm_override) { m_dasm_override = dasm_override; }
|
||||
|
||||
// disassembly
|
||||
offs_t disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) const;
|
||||
@ -316,9 +313,6 @@ private:
|
||||
symbol_table m_symtable; // symbol table for expression evaluation
|
||||
debug_instruction_hook_func m_instrhook; // per-instruction callback hook
|
||||
|
||||
// disassembly
|
||||
dasm_override_func m_dasm_override; // pointer to provided override function
|
||||
|
||||
// stepping information
|
||||
offs_t m_stepaddr; // step target address for DEBUG_FLAG_STEPPING_OVER
|
||||
int m_stepsleft; // number of steps left until done
|
||||
|
@ -41,6 +41,8 @@
|
||||
#define MCFG_CPU_PERIODIC_INT_REMOVE MCFG_DEVICE_PERIODIC_INT_REMOVE
|
||||
#define MCFG_CPU_IRQ_ACKNOWLEDGE_REMOVE MCFG_DEVICE_IRQ_ACKNOWLEDGE_REMOVE
|
||||
|
||||
#define MCFG_CPU_DISASSEMBLE_OVERRIDE MCFG_DEVICE_DISASSEMBLE_OVERRIDE
|
||||
|
||||
// recompilation parameters
|
||||
#define MCFG_CPU_FORCE_NO_DRC() \
|
||||
cpu_device::static_set_force_no_drc(*device, true);
|
||||
|
@ -32,3 +32,47 @@ device_disasm_interface::device_disasm_interface(const machine_config &mconfig,
|
||||
device_disasm_interface::~device_disasm_interface()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// interface_pre_start - work to be done prior to
|
||||
// actually starting a device
|
||||
//-------------------------------------------------
|
||||
|
||||
void device_disasm_interface::interface_pre_start()
|
||||
{
|
||||
// bind delegate
|
||||
m_dasm_override.bind_relative_to(*device().owner());
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// static_set_dasm_override - configuration
|
||||
// helper to override disassemble function
|
||||
//-------------------------------------------------
|
||||
|
||||
void device_disasm_interface::static_set_dasm_override(device_t &device, dasm_override_delegate dasm_override)
|
||||
{
|
||||
device_disasm_interface *dasm;
|
||||
if (!device.interface(dasm))
|
||||
throw emu_fatalerror("MCFG_DEVICE_DISASSEMBLE_OVERRIDE called on device '%s' with no disasm interface", device.tag());
|
||||
dasm->m_dasm_override = dasm_override;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// disassemble - interface for disassembly
|
||||
//-------------------------------------------------
|
||||
|
||||
offs_t device_disasm_interface::disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
|
||||
{
|
||||
offs_t result = 0;
|
||||
|
||||
// check for disassembler override
|
||||
if (!m_dasm_override.isnull())
|
||||
result = m_dasm_override(device(), buffer, pc, oprom, opram, options);
|
||||
if (result == 0)
|
||||
result = disasm_disassemble(buffer, pc, oprom, opram, options);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -40,16 +40,27 @@ const UINT32 DASMFLAG_LENGTHMASK = 0x0000ffff; // the low 16-bits contain t
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_DEVICE_DISASSEMBLE_OVERRIDE(_class, _func) \
|
||||
device_disasm_interface::static_set_dasm_override(*device, dasm_override_delegate(&_class::_func, #_class "::" #_func, nullptr, (_class *)nullptr));
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
typedef device_delegate<offs_t (device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)> dasm_override_delegate;
|
||||
|
||||
// ======================> device_disasm_interface
|
||||
|
||||
// class representing interface-specific live disasm
|
||||
class device_disasm_interface : public device_interface
|
||||
{
|
||||
|
||||
public:
|
||||
// construction/destruction
|
||||
device_disasm_interface(const machine_config &mconfig, device_t &device);
|
||||
@ -59,14 +70,23 @@ public:
|
||||
UINT32 min_opcode_bytes() const { return disasm_min_opcode_bytes(); }
|
||||
UINT32 max_opcode_bytes() const { return disasm_max_opcode_bytes(); }
|
||||
|
||||
// static inline configuration helpers
|
||||
static void static_set_dasm_override(device_t &device, dasm_override_delegate dasm_override);
|
||||
|
||||
// interface for disassembly
|
||||
offs_t disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options = 0) { return disasm_disassemble(buffer, pc, oprom, opram, options); }
|
||||
offs_t disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options = 0);
|
||||
|
||||
protected:
|
||||
// required operation overrides
|
||||
virtual UINT32 disasm_min_opcode_bytes() const = 0;
|
||||
virtual UINT32 disasm_max_opcode_bytes() const = 0;
|
||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) = 0;
|
||||
|
||||
// interface-level overrides
|
||||
virtual void interface_pre_start() override;
|
||||
|
||||
private:
|
||||
dasm_override_delegate m_dasm_override; // provided override function
|
||||
};
|
||||
|
||||
// iterator
|
||||
|
@ -294,6 +294,7 @@ static MACHINE_CONFIG_START( coco, coco12_state )
|
||||
// basic machine hardware
|
||||
MCFG_CPU_ADD(MAINCPU_TAG, M6809E, XTAL_3_579545MHz)
|
||||
MCFG_CPU_PROGRAM_MAP(coco_mem)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(coco_state, dasm_override)
|
||||
|
||||
// devices
|
||||
MCFG_DEVICE_ADD(PIA0_TAG, PIA6821, 0)
|
||||
|
@ -245,6 +245,7 @@ static MACHINE_CONFIG_START( coco3, coco3_state )
|
||||
// basic machine hardware
|
||||
MCFG_CPU_ADD(MAINCPU_TAG, M6809E, XTAL_3_579545MHz)
|
||||
MCFG_CPU_PROGRAM_MAP(coco3_mem)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(coco_state, dasm_override)
|
||||
|
||||
// devices
|
||||
MCFG_DEVICE_ADD(PIA0_TAG, PIA6821, 0)
|
||||
|
@ -893,6 +893,7 @@ static MACHINE_CONFIG_START( mac512ke, mac_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, C7M) /* 7.8336 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(mac512ke_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(60))
|
||||
|
||||
/* video hardware */
|
||||
@ -1023,6 +1024,7 @@ static MACHINE_CONFIG_START( macprtb, mac_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, C15M)
|
||||
MCFG_CPU_PROGRAM_MAP(macprtb_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(60))
|
||||
|
||||
/* video hardware */
|
||||
@ -1084,6 +1086,7 @@ static MACHINE_CONFIG_START( macii, mac_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68020PMMU, C15M)
|
||||
MCFG_CPU_PROGRAM_MAP(macii_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_PALETTE_ADD("palette", 256)
|
||||
|
||||
@ -1153,6 +1156,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( maciihmu, macii )
|
||||
MCFG_CPU_REPLACE("maincpu", M68020HMMU, C15M)
|
||||
MCFG_CPU_PROGRAM_MAP(macii_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( maciifx, mac_state )
|
||||
@ -1160,6 +1164,7 @@ static MACHINE_CONFIG_START( maciifx, mac_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68030, 40000000)
|
||||
MCFG_CPU_PROGRAM_MAP(maciifx_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
@ -1221,6 +1226,7 @@ static MACHINE_CONFIG_DERIVED( maclc, macii )
|
||||
MCFG_CPU_REPLACE("maincpu", M68020HMMU, C15M)
|
||||
MCFG_CPU_PROGRAM_MAP(maclc_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_PALETTE_MODIFY("palette")
|
||||
MCFG_PALETTE_ENTRIES(256)
|
||||
@ -1277,6 +1283,7 @@ static MACHINE_CONFIG_DERIVED( maclc2, maclc )
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, C15M)
|
||||
MCFG_CPU_PROGRAM_MAP(maclc_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_RAM_MODIFY(RAM_TAG)
|
||||
MCFG_RAM_DEFAULT_SIZE("4M")
|
||||
@ -1301,6 +1308,7 @@ static MACHINE_CONFIG_DERIVED( maclc3, maclc )
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(maclc3_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(mac_state,macsonora)
|
||||
MCFG_VIDEO_RESET_OVERRIDE(mac_state,macsonora)
|
||||
@ -1341,6 +1349,7 @@ static MACHINE_CONFIG_DERIVED( maciivx, maclc )
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, C32M)
|
||||
MCFG_CPU_PROGRAM_MAP(maclc3_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(mac_state,macv8)
|
||||
MCFG_VIDEO_RESET_OVERRIDE(mac_state,macrbv)
|
||||
@ -1376,6 +1385,7 @@ static MACHINE_CONFIG_DERIVED( maciivi, maclc )
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, C15M)
|
||||
MCFG_CPU_PROGRAM_MAP(maclc3_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(mac_state,macv8)
|
||||
MCFG_VIDEO_RESET_OVERRIDE(mac_state,macrbv)
|
||||
@ -1410,6 +1420,7 @@ static MACHINE_CONFIG_DERIVED( maciix, macii )
|
||||
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, C15M)
|
||||
MCFG_CPU_PROGRAM_MAP(macii_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_RAM_MODIFY(RAM_TAG)
|
||||
MCFG_RAM_DEFAULT_SIZE("2M")
|
||||
@ -1426,6 +1437,7 @@ static MACHINE_CONFIG_START( macse30, mac_state )
|
||||
|
||||
MCFG_CPU_ADD("maincpu", M68030, C15M)
|
||||
MCFG_CPU_PROGRAM_MAP(macse30_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD(MAC_SCREEN_NAME, RASTER)
|
||||
@ -1503,6 +1515,7 @@ static MACHINE_CONFIG_START( macpb140, mac_state )
|
||||
|
||||
MCFG_CPU_ADD("maincpu", M68030, C15M)
|
||||
MCFG_CPU_PROGRAM_MAP(macpb140_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD(MAC_SCREEN_NAME, RASTER)
|
||||
@ -1568,6 +1581,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( macpb145, macpb140 )
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(macpb140_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_RAM_MODIFY(RAM_TAG)
|
||||
MCFG_RAM_DEFAULT_SIZE("4M")
|
||||
@ -1578,6 +1592,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( macpb170, macpb140 )
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(macpb140_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_RAM_MODIFY(RAM_TAG)
|
||||
MCFG_RAM_DEFAULT_SIZE("4M")
|
||||
@ -1588,6 +1603,7 @@ static MACHINE_CONFIG_START( macpb160, mac_state )
|
||||
|
||||
MCFG_CPU_ADD("maincpu", M68030, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(macpb160_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD(MAC_SCREEN_NAME, RASTER)
|
||||
@ -1652,6 +1668,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( macpb180, macpb160 )
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, 33000000)
|
||||
MCFG_CPU_PROGRAM_MAP(macpb160_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_RAM_MODIFY(RAM_TAG)
|
||||
MCFG_RAM_DEFAULT_SIZE("4M")
|
||||
@ -1661,6 +1678,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( macpb180c, macpb160 )
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, 33000000)
|
||||
MCFG_CPU_PROGRAM_MAP(macpb165c_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_SCREEN_MODIFY(MAC_SCREEN_NAME)
|
||||
MCFG_SCREEN_SIZE(800, 525)
|
||||
@ -1676,6 +1694,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( macpd210, macpb160 )
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(macpd210_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_RAM_MODIFY(RAM_TAG)
|
||||
MCFG_RAM_DEFAULT_SIZE("4M")
|
||||
@ -1686,6 +1705,7 @@ static MACHINE_CONFIG_DERIVED( macclas2, maclc )
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, C15M)
|
||||
MCFG_CPU_PROGRAM_MAP(maclc_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(mac_state,macv8)
|
||||
MCFG_VIDEO_RESET_OVERRIDE(mac_state,maceagle)
|
||||
@ -1715,6 +1735,7 @@ static MACHINE_CONFIG_DERIVED( maciici, macii )
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(maciici_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_PALETTE_MODIFY("palette")
|
||||
MCFG_PALETTE_ENTRIES(256)
|
||||
@ -1745,6 +1766,7 @@ static MACHINE_CONFIG_DERIVED( maciisi, macii )
|
||||
MCFG_CPU_REPLACE("maincpu", M68030, 20000000)
|
||||
MCFG_CPU_PROGRAM_MAP(maciici_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state, mac_rbv_vbl)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_PALETTE_MODIFY("palette")
|
||||
MCFG_PALETTE_ENTRIES(256)
|
||||
@ -1855,6 +1877,7 @@ static MACHINE_CONFIG_START( macqd700, mac_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68040, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(quadra700_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(mac_state, mac_dasm_override)
|
||||
|
||||
MCFG_SCREEN_ADD(MAC_SCREEN_NAME, RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(75.08)
|
||||
|
@ -16,8 +16,6 @@
|
||||
#include "machine/mc68328.h"
|
||||
#include "machine/ram.h"
|
||||
#include "sound/dac.h"
|
||||
#include "debugger.h"
|
||||
#include "debug/debugcpu.h"
|
||||
#include "rendlay.h"
|
||||
|
||||
#define MC68328_TAG "dragonball"
|
||||
@ -65,9 +63,9 @@ public:
|
||||
required_ioport m_io_peny;
|
||||
required_ioport m_io_penb;
|
||||
required_ioport m_io_portd;
|
||||
};
|
||||
|
||||
static offs_t palm_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options);
|
||||
offs_t palm_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options);
|
||||
};
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -141,9 +139,6 @@ void palm_state::machine_start()
|
||||
|
||||
save_item(NAME(m_port_f_latch));
|
||||
save_item(NAME(m_spim_data));
|
||||
|
||||
if (m_maincpu->debug())
|
||||
m_maincpu->debug()->set_dasm_override(palm_dasm_override);
|
||||
}
|
||||
|
||||
void palm_state::machine_reset()
|
||||
@ -192,6 +187,7 @@ static MACHINE_CONFIG_START( palm, palm_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD( "maincpu", M68000, 32768*506 ) /* 16.580608 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP( palm_map)
|
||||
MCFG_CPU_DISASSEMBLE_OVERRIDE(palm_state, palm_dasm_override)
|
||||
|
||||
MCFG_QUANTUM_TIME( attotime::from_hz(60) )
|
||||
|
||||
|
@ -1162,7 +1162,7 @@ static const char *lookup_trap(UINT16 opcode)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static offs_t palm_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
|
||||
offs_t palm_state::palm_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
|
||||
{
|
||||
UINT16 opcode;
|
||||
unsigned result = 0;
|
||||
|
@ -140,6 +140,10 @@ public:
|
||||
DECLARE_READ8_MEMBER( floating_bus_read ) { return floating_bus_read(); }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( cart_w ) { cart_w((bool) state); }
|
||||
|
||||
// disassembly override
|
||||
offs_t dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
@ -228,9 +232,6 @@ private:
|
||||
// floating bus
|
||||
UINT8 floating_bus_read(void);
|
||||
|
||||
// disassembly override
|
||||
static offs_t dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options);
|
||||
|
||||
// input ports
|
||||
ioport_port *m_keyboard[7];
|
||||
ioport_port *m_joystick_type_control;
|
||||
|
@ -221,6 +221,8 @@ public:
|
||||
required_device<floppy_connector> m_floppy3;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
offs_t dgnbeta_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options);
|
||||
|
||||
private:
|
||||
void execute_beta_key_dump(int ref, int params, const char *param[]);
|
||||
void execute_beta_dat_log(int ref, int params, const char *param[]);
|
||||
|
@ -557,6 +557,7 @@ public:
|
||||
void mac_driver_init(model_t model);
|
||||
void mac_install_memory(offs_t memory_begin, offs_t memory_end,
|
||||
offs_t memory_size, void *memory_data, int is_rom, const char *bank);
|
||||
offs_t mac_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options);
|
||||
};
|
||||
|
||||
#endif /* MAC_H_ */
|
||||
|
@ -59,7 +59,6 @@ DAC and bitbanger values written should be reflected in the read.
|
||||
|
||||
#include "includes/coco.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "debug/debugcpu.h"
|
||||
|
||||
|
||||
|
||||
@ -160,12 +159,6 @@ void coco_state::device_start()
|
||||
save_item(NAME(m_dclg_timer));
|
||||
save_item(NAME(m_vhd_select));
|
||||
|
||||
/* set up disassembly override */
|
||||
if (m_maincpu->debug())
|
||||
{
|
||||
m_maincpu->debug()->set_dasm_override(dasm_override);
|
||||
}
|
||||
|
||||
// miscellaneous
|
||||
m_in_floating_bus_read = false;
|
||||
}
|
||||
|
@ -69,7 +69,6 @@
|
||||
#include "imagedev/flopdrv.h"
|
||||
|
||||
#include "debugger.h"
|
||||
#include "debug/debugcpu.h"
|
||||
#include "debug/debugcon.h"
|
||||
#include "machine/ram.h"
|
||||
|
||||
@ -87,9 +86,6 @@
|
||||
#define LOG_INTS(x) do { if (VERBOSE) logerror x; } while (0)
|
||||
|
||||
|
||||
/* Debugging commands and handlers. */
|
||||
static offs_t dgnbeta_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options);
|
||||
|
||||
//static int DMA_NMI; /* DMA cpu has received an NMI */
|
||||
|
||||
#define INVALID_KEYROW -1 /* no ketrow selected */
|
||||
@ -939,10 +935,6 @@ void dgn_beta_state::machine_start()
|
||||
{
|
||||
logerror("MACHINE_START( dgnbeta )\n");
|
||||
|
||||
if (machine().device<cpu_device>(MAINCPU_TAG)->debug()) {
|
||||
machine().device<cpu_device>(MAINCPU_TAG)->debug()->set_dasm_override(dgnbeta_dasm_override);
|
||||
}
|
||||
|
||||
/* setup debug commands */
|
||||
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
|
||||
{
|
||||
@ -1109,7 +1101,7 @@ static const char *const os9syscalls[] =
|
||||
};
|
||||
|
||||
|
||||
static offs_t dgnbeta_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
|
||||
offs_t dgn_beta_state::dgnbeta_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
|
||||
{
|
||||
unsigned call;
|
||||
unsigned result = 0;
|
||||
|
@ -94,8 +94,6 @@
|
||||
#include "includes/mac.h"
|
||||
#include "machine/applefdc.h"
|
||||
#include "machine/sonydriv.h"
|
||||
#include "debug/debugcpu.h"
|
||||
#include "debugger.h"
|
||||
|
||||
#define AUDIO_IS_CLASSIC (m_model <= MODEL_MAC_CLASSIC)
|
||||
#define MAC_HAS_VIA2 ((m_model >= MODEL_MAC_II) && (m_model != MODEL_MAC_IIFX))
|
||||
@ -118,8 +116,6 @@
|
||||
#define LOG_MEMORY 0
|
||||
#endif
|
||||
|
||||
static offs_t mac_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options);
|
||||
|
||||
// returns non-zero if this Mac has ADB
|
||||
int mac_state::has_adb()
|
||||
{
|
||||
@ -1986,10 +1982,6 @@ void mac_state::machine_reset()
|
||||
}
|
||||
|
||||
m_scsi_interrupt = 0;
|
||||
if ((m_maincpu->debug()) && (m_model < MODEL_MAC_POWERMAC_6100))
|
||||
{
|
||||
m_maincpu->debug()->set_dasm_override(mac_dasm_override);
|
||||
}
|
||||
|
||||
m_drive_select = 0;
|
||||
m_scsiirq_enable = 0;
|
||||
@ -3185,7 +3177,7 @@ const char *lookup_trap(UINT16 opcode)
|
||||
|
||||
|
||||
|
||||
static offs_t mac_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
|
||||
offs_t mac_state::mac_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
|
||||
{
|
||||
UINT16 opcode;
|
||||
unsigned result = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user