mirror of
https://github.com/holub/mame
synced 2025-06-05 12:26:35 +03:00
changed CPU_DISASSEMBLE to use cpu_device * instead of legacy_cpu_device *, so that class based cpu devices can also be passed.
This commit is contained in:
parent
226e33c4d0
commit
18e1c572cb
@ -364,13 +364,14 @@ static const char *const m6809_regs_te[16] =
|
||||
"A", "B", "CC", "DP", "inv", "inv", "inv", "inv"
|
||||
};
|
||||
|
||||
offs_t m6809_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options, m6809_base_device *m6809)
|
||||
CPU_DISASSEMBLE( m6809 )
|
||||
{
|
||||
UINT8 opcode, mode, pb, pbm, reg;
|
||||
const UINT8 *operandarray;
|
||||
unsigned int ea, flags;
|
||||
int numoperands, offset, indirect;
|
||||
bool encrypt_only_first_byte = false;
|
||||
m6809_base_device *m6809 = static_cast<m6809_base_device *>(device);
|
||||
if (m6809 != NULL)
|
||||
{
|
||||
m6809_config &config = static_cast<m6809_config &>(*m6809);
|
||||
|
@ -359,8 +359,8 @@ UINT32 m6809_base_device::disasm_max_opcode_bytes() const
|
||||
|
||||
offs_t m6809_base_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
|
||||
{
|
||||
extern offs_t m6809_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options, m6809_base_device *m6809);
|
||||
return m6809_disassemble(buffer, pc, oprom, opram, options, this);
|
||||
extern CPU_DISASSEMBLE( m6809 );
|
||||
return CPU_DISASSEMBLE_NAME(m6809)(this, buffer, pc, oprom, opram, options);
|
||||
}
|
||||
|
||||
|
||||
|
@ -146,7 +146,7 @@ enum
|
||||
CPUINFO_FCT_EXIT, // R/O: void (*exit)(legacy_cpu_device *device)
|
||||
CPUINFO_FCT_EXECUTE, // R/O: int (*execute)(legacy_cpu_device *device, int cycles)
|
||||
CPUINFO_FCT_BURN, // R/O: void (*burn)(legacy_cpu_device *device, int cycles)
|
||||
CPUINFO_FCT_DISASSEMBLE, // R/O: offs_t (*disassemble)(legacy_cpu_device *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
|
||||
CPUINFO_FCT_DISASSEMBLE, // R/O: offs_t (*disassemble)(cpu_device *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
|
||||
CPUINFO_FCT_TRANSLATE, // R/O: int (*translate)(legacy_cpu_device *device, address_spacenum space, int intention, offs_t *address)
|
||||
CPUINFO_FCT_READ, // R/O: int (*read)(legacy_cpu_device *device, address_spacenum space, UINT32 offset, int size, UINT64 *value)
|
||||
CPUINFO_FCT_WRITE, // R/O: int (*write)(legacy_cpu_device *device, address_spacenum space, UINT32 offset, int size, UINT64 value)
|
||||
@ -278,7 +278,7 @@ const device_type name = &legacy_device_creator<basename##_device>
|
||||
#define CPU_DEBUG_INIT_CALL(name) CPU_DEBUG_INIT_NAME(name)(device)
|
||||
|
||||
#define CPU_DISASSEMBLE_NAME(name) cpu_disassemble_##name
|
||||
#define CPU_DISASSEMBLE(name) offs_t CPU_DISASSEMBLE_NAME(name)(legacy_cpu_device *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
|
||||
#define CPU_DISASSEMBLE(name) offs_t CPU_DISASSEMBLE_NAME(name)(cpu_device *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
|
||||
#define CPU_DISASSEMBLE_CALL(name) CPU_DISASSEMBLE_NAME(name)(device, buffer, pc, oprom, opram, options)
|
||||
|
||||
#define CPU_IMPORT_STATE_NAME(name) cpu_state_import_##name
|
||||
@ -324,7 +324,7 @@ typedef int (*cpu_read_func)(legacy_cpu_device *device, address_spacenum space,
|
||||
typedef int (*cpu_write_func)(legacy_cpu_device *device, address_spacenum space, UINT32 offset, int size, UINT64 value);
|
||||
typedef int (*cpu_readop_func)(legacy_cpu_device *device, UINT32 offset, int size, UINT64 *value);
|
||||
typedef void (*cpu_debug_init_func)(legacy_cpu_device *device);
|
||||
typedef offs_t (*cpu_disassemble_func)(legacy_cpu_device *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options);
|
||||
typedef offs_t (*cpu_disassemble_func)(cpu_device *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options);
|
||||
typedef void (*cpu_state_io_func)(legacy_cpu_device *device, const device_state_entry &entry);
|
||||
typedef void (*cpu_string_io_func)(legacy_cpu_device *device, const device_state_entry &entry, astring &string);
|
||||
|
||||
|
@ -40,8 +40,6 @@
|
||||
#include "emu.h"
|
||||
#include <ctype.h>
|
||||
|
||||
class m6809_base_device;
|
||||
|
||||
enum display_type
|
||||
{
|
||||
_8bit,
|
||||
@ -113,7 +111,7 @@ CPU_DISASSEMBLE( f8 );
|
||||
CPU_DISASSEMBLE( g65816_generic );
|
||||
CPU_DISASSEMBLE( h6280 );
|
||||
CPU_DISASSEMBLE( h8 );
|
||||
CPU_DISASSEMBLE( hd6309 ) { extern offs_t hd6309_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); return hd6309_disassemble(buffer, pc, oprom, opram, 0); }
|
||||
CPU_DISASSEMBLE( hd6309 );
|
||||
CPU_DISASSEMBLE( i4004 );
|
||||
CPU_DISASSEMBLE( i8008 );
|
||||
CPU_DISASSEMBLE( i8085 );
|
||||
@ -123,7 +121,7 @@ CPU_DISASSEMBLE( x86_64 );
|
||||
CPU_DISASSEMBLE( i960 );
|
||||
CPU_DISASSEMBLE( jaguargpu );
|
||||
CPU_DISASSEMBLE( jaguardsp );
|
||||
CPU_DISASSEMBLE( konami ) { extern offs_t konami_cpu_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); return konami_cpu_disassemble(buffer, pc, oprom, opram, 0); }
|
||||
CPU_DISASSEMBLE( konami );
|
||||
CPU_DISASSEMBLE( lh5801 );
|
||||
CPU_DISASSEMBLE( lr35902 );
|
||||
CPU_DISASSEMBLE( m37710_generic );
|
||||
@ -140,7 +138,7 @@ CPU_DISASSEMBLE( m68020 );
|
||||
CPU_DISASSEMBLE( m68030 );
|
||||
CPU_DISASSEMBLE( m68040 );
|
||||
CPU_DISASSEMBLE( m6805 );
|
||||
CPU_DISASSEMBLE( m6809 ) { extern offs_t m6809_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options, m6809_base_device *m6809); return m6809_disassemble(buffer, pc, oprom, opram, 0, NULL); }
|
||||
CPU_DISASSEMBLE( m6809 );
|
||||
CPU_DISASSEMBLE( mb86233 );
|
||||
CPU_DISASSEMBLE( mb88 );
|
||||
CPU_DISASSEMBLE( mcs48 );
|
||||
|
Loading…
Reference in New Issue
Block a user