trunk/src/tools/unidasm.c
| r21635 | r21636 | |
| 40 | 40 | #include "emu.h" |
| 41 | 41 | #include <ctype.h> |
| 42 | 42 | |
| 43 | | class m6809_base_device; |
| 44 | | |
| 45 | 43 | enum display_type |
| 46 | 44 | { |
| 47 | 45 | _8bit, |
| r21635 | r21636 | |
| 113 | 111 | CPU_DISASSEMBLE( g65816_generic ); |
| 114 | 112 | CPU_DISASSEMBLE( h6280 ); |
| 115 | 113 | CPU_DISASSEMBLE( h8 ); |
| 116 | | 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); } |
| 114 | CPU_DISASSEMBLE( hd6309 ); |
| 117 | 115 | CPU_DISASSEMBLE( i4004 ); |
| 118 | 116 | CPU_DISASSEMBLE( i8008 ); |
| 119 | 117 | CPU_DISASSEMBLE( i8085 ); |
| r21635 | r21636 | |
| 123 | 121 | CPU_DISASSEMBLE( i960 ); |
| 124 | 122 | CPU_DISASSEMBLE( jaguargpu ); |
| 125 | 123 | CPU_DISASSEMBLE( jaguardsp ); |
| 126 | | 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); } |
| 124 | CPU_DISASSEMBLE( konami ); |
| 127 | 125 | CPU_DISASSEMBLE( lh5801 ); |
| 128 | 126 | CPU_DISASSEMBLE( lr35902 ); |
| 129 | 127 | CPU_DISASSEMBLE( m37710_generic ); |
| r21635 | r21636 | |
| 140 | 138 | CPU_DISASSEMBLE( m68030 ); |
| 141 | 139 | CPU_DISASSEMBLE( m68040 ); |
| 142 | 140 | CPU_DISASSEMBLE( m6805 ); |
| 143 | | 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); } |
| 141 | CPU_DISASSEMBLE( m6809 ); |
| 144 | 142 | CPU_DISASSEMBLE( mb86233 ); |
| 145 | 143 | CPU_DISASSEMBLE( mb88 ); |
| 146 | 144 | CPU_DISASSEMBLE( mcs48 ); |
trunk/src/emu/devcpu.h
| r21635 | r21636 | |
| 146 | 146 | CPUINFO_FCT_EXIT, // R/O: void (*exit)(legacy_cpu_device *device) |
| 147 | 147 | CPUINFO_FCT_EXECUTE, // R/O: int (*execute)(legacy_cpu_device *device, int cycles) |
| 148 | 148 | CPUINFO_FCT_BURN, // R/O: void (*burn)(legacy_cpu_device *device, int cycles) |
| 149 | | 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) |
| 149 | CPUINFO_FCT_DISASSEMBLE, // R/O: offs_t (*disassemble)(cpu_device *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options) |
| 150 | 150 | CPUINFO_FCT_TRANSLATE, // R/O: int (*translate)(legacy_cpu_device *device, address_spacenum space, int intention, offs_t *address) |
| 151 | 151 | CPUINFO_FCT_READ, // R/O: int (*read)(legacy_cpu_device *device, address_spacenum space, UINT32 offset, int size, UINT64 *value) |
| 152 | 152 | CPUINFO_FCT_WRITE, // R/O: int (*write)(legacy_cpu_device *device, address_spacenum space, UINT32 offset, int size, UINT64 value) |
| r21635 | r21636 | |
| 278 | 278 | #define CPU_DEBUG_INIT_CALL(name) CPU_DEBUG_INIT_NAME(name)(device) |
| 279 | 279 | |
| 280 | 280 | #define CPU_DISASSEMBLE_NAME(name) cpu_disassemble_##name |
| 281 | | #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) |
| 281 | #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) |
| 282 | 282 | #define CPU_DISASSEMBLE_CALL(name) CPU_DISASSEMBLE_NAME(name)(device, buffer, pc, oprom, opram, options) |
| 283 | 283 | |
| 284 | 284 | #define CPU_IMPORT_STATE_NAME(name) cpu_state_import_##name |
| r21635 | r21636 | |
| 324 | 324 | typedef int (*cpu_write_func)(legacy_cpu_device *device, address_spacenum space, UINT32 offset, int size, UINT64 value); |
| 325 | 325 | typedef int (*cpu_readop_func)(legacy_cpu_device *device, UINT32 offset, int size, UINT64 *value); |
| 326 | 326 | typedef void (*cpu_debug_init_func)(legacy_cpu_device *device); |
| 327 | | typedef offs_t (*cpu_disassemble_func)(legacy_cpu_device *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options); |
| 327 | typedef offs_t (*cpu_disassemble_func)(cpu_device *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options); |
| 328 | 328 | typedef void (*cpu_state_io_func)(legacy_cpu_device *device, const device_state_entry &entry); |
| 329 | 329 | typedef void (*cpu_string_io_func)(legacy_cpu_device *device, const device_state_entry &entry, astring &string); |
| 330 | 330 | |
trunk/src/emu/cpu/m6809/m6809.c
| r21635 | r21636 | |
| 359 | 359 | |
| 360 | 360 | offs_t m6809_base_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) |
| 361 | 361 | { |
| 362 | | extern offs_t m6809_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options, m6809_base_device *m6809); |
| 363 | | return m6809_disassemble(buffer, pc, oprom, opram, options, this); |
| 362 | extern CPU_DISASSEMBLE( m6809 ); |
| 363 | return CPU_DISASSEMBLE_NAME(m6809)(this, buffer, pc, oprom, opram, options); |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | |
trunk/src/emu/cpu/m6809/6809dasm.c
| r21635 | r21636 | |
| 364 | 364 | "A", "B", "CC", "DP", "inv", "inv", "inv", "inv" |
| 365 | 365 | }; |
| 366 | 366 | |
| 367 | | offs_t m6809_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options, m6809_base_device *m6809) |
| 367 | CPU_DISASSEMBLE( m6809 ) |
| 368 | 368 | { |
| 369 | 369 | UINT8 opcode, mode, pb, pbm, reg; |
| 370 | 370 | const UINT8 *operandarray; |
| 371 | 371 | unsigned int ea, flags; |
| 372 | 372 | int numoperands, offset, indirect; |
| 373 | 373 | bool encrypt_only_first_byte = false; |
| 374 | m6809_base_device *m6809 = static_cast<m6809_base_device *>(device); |
| 374 | 375 | if (m6809 != NULL) |
| 375 | 376 | { |
| 376 | 377 | m6809_config &config = static_cast<m6809_config &>(*m6809); |