mirror of
https://github.com/holub/mame
synced 2025-06-06 21:03:47 +03:00
Changed disassembler infrastructure to not use char buffers internally
This commit is contained in:
parent
5eefcfdb68
commit
a29891d2e5
@ -581,8 +581,8 @@ void n8x300_cpu_device::execute_run()
|
|||||||
} while (m_icount > 0);
|
} while (m_icount > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
offs_t n8x300_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t n8x300_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( n8x300 );
|
extern CPU_DISASSEMBLE( n8x300 );
|
||||||
return CPU_DISASSEMBLE_NAME(n8x300)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(n8x300)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 2; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 2; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
|
||||||
|
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
address_space_config m_io_config;
|
address_space_config m_io_config;
|
||||||
|
@ -41,7 +41,7 @@ static inline bool is_src_rot(uint16_t opcode)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static offs_t internal_disasm_n8x300(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(n8x300)
|
||||||
{
|
{
|
||||||
unsigned startpc = pc;
|
unsigned startpc = pc;
|
||||||
uint16_t opcode = (oprom[pc - startpc] << 8) | oprom[pc+1 - startpc];
|
uint16_t opcode = (oprom[pc - startpc] << 8) | oprom[pc+1 - startpc];
|
||||||
@ -129,13 +129,3 @@ static offs_t internal_disasm_n8x300(cpu_device *device, std::ostream &stream, o
|
|||||||
|
|
||||||
return (pc - startpc);
|
return (pc - startpc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(n8x300)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_n8x300(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -233,7 +233,7 @@ static void aluconst(std::ostream &stream, int dest, int op)
|
|||||||
|
|
||||||
|
|
||||||
/* execute instructions on this CPU until icount expires */
|
/* execute instructions on this CPU until icount expires */
|
||||||
static offs_t internal_disasm_adsp21xx(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(adsp21xx)
|
||||||
{
|
{
|
||||||
unsigned int op = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16);
|
unsigned int op = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16);
|
||||||
unsigned dasmflags = 0;
|
unsigned dasmflags = 0;
|
||||||
@ -551,14 +551,3 @@ static offs_t internal_disasm_adsp21xx(cpu_device *device, std::ostream &stream,
|
|||||||
|
|
||||||
return 1 | dasmflags | DASMFLAG_SUPPORTED;
|
return 1 | dasmflags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(adsp21xx)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_adsp21xx(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -774,10 +774,10 @@ uint32_t adsp21xx_device::disasm_max_opcode_bytes() const
|
|||||||
// helper function
|
// helper function
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
offs_t adsp21xx_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t adsp21xx_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( adsp21xx );
|
extern CPU_DISASSEMBLE( adsp21xx );
|
||||||
return CPU_DISASSEMBLE_NAME(adsp21xx)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(adsp21xx)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override;
|
virtual uint32_t disasm_max_opcode_bytes() const override;
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
// helpers
|
// helpers
|
||||||
void create_tables();
|
void create_tables();
|
||||||
|
@ -349,7 +349,7 @@ static void InitDasm8201(void)
|
|||||||
OpInizialized = 1;
|
OpInizialized = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static offs_t internal_disasm_alpha8201(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(alpha8201)
|
||||||
{
|
{
|
||||||
offs_t dasmflags = 0;
|
offs_t dasmflags = 0;
|
||||||
int i;
|
int i;
|
||||||
@ -413,12 +413,3 @@ static offs_t internal_disasm_alpha8201(cpu_device *device, std::ostream &stream
|
|||||||
|
|
||||||
return cnt | dasmflags | DASMFLAG_SUPPORTED;
|
return cnt | dasmflags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPU_DISASSEMBLE(alpha8201)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_alpha8201(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -688,8 +688,8 @@ void alpha8201_cpu_device::execute_set_input(int inputnum, int state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t alpha8201_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t alpha8201_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( alpha8201 );
|
extern CPU_DISASSEMBLE( alpha8201 );
|
||||||
return CPU_DISASSEMBLE_NAME(alpha8201)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(alpha8201)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
uint8_t M_RDMEM(uint16_t A) { return m_program->read_byte(A); }
|
uint8_t M_RDMEM(uint16_t A) { return m_program->read_byte(A); }
|
||||||
void M_WRMEM(uint16_t A,uint8_t V) { m_program->write_byte(A, V); }
|
void M_WRMEM(uint16_t A,uint8_t V) { m_program->write_byte(A, V); }
|
||||||
|
@ -238,7 +238,7 @@ protected:
|
|||||||
//! device_disasm_interface overrides
|
//! device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 4; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -913,8 +913,6 @@ private:
|
|||||||
|
|
||||||
uint8_t m_ether_id; //!< configured Ethernet ID for this machine
|
uint8_t m_ether_id; //!< configured Ethernet ID for this machine
|
||||||
|
|
||||||
offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options);
|
|
||||||
|
|
||||||
//*******************************************
|
//*******************************************
|
||||||
// inline the sub-devices
|
// inline the sub-devices
|
||||||
//*******************************************
|
//*******************************************
|
||||||
|
@ -394,13 +394,3 @@ offs_t alto2_cpu_device::disasm_disassemble(std::ostream &main_stream, offs_t pc
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t alto2_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = disasm_disassemble(stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -695,8 +695,8 @@ void am29000_cpu_device::execute_set_input(int inputnum, int state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t am29000_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t am29000_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( am29000 );
|
extern CPU_DISASSEMBLE( am29000 );
|
||||||
return CPU_DISASSEMBLE_NAME(am29000)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(am29000)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
@ -468,7 +468,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 4; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
void signal_exception(uint32_t type);
|
void signal_exception(uint32_t type);
|
||||||
void external_irq_check();
|
void external_irq_check();
|
||||||
|
@ -117,7 +117,7 @@ static const char* get_spr(int spid)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static offs_t internal_disasm_am29000(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(am29000)
|
||||||
{
|
{
|
||||||
uint32_t op = (oprom[0] << 24) | (oprom[1] << 16) | (oprom[2] << 8) | oprom[3];
|
uint32_t op = (oprom[0] << 24) | (oprom[1] << 16) | (oprom[2] << 8) | oprom[3];
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
@ -230,12 +230,3 @@ static offs_t internal_disasm_am29000(cpu_device *device, std::ostream &stream,
|
|||||||
|
|
||||||
return 4 | flags | DASMFLAG_SUPPORTED;
|
return 4 | flags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPU_DISASSEMBLE(am29000)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_am29000(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -89,10 +89,10 @@ void amis2000_base_device::state_string_export(const device_state_entry &entry,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
offs_t amis2000_base_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t amis2000_base_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE(amis2000);
|
extern CPU_DISASSEMBLE(amis2000);
|
||||||
return CPU_DISASSEMBLE_NAME(amis2000)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(amis2000)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 1; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 1; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
// device_state_interface overrides
|
// device_state_interface overrides
|
||||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||||
|
@ -100,7 +100,7 @@ static const uint8_t s2000_mnemonic[0x100] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static offs_t internal_disasm_amis2000(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(amis2000)
|
||||||
{
|
{
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
uint8_t op = oprom[pos++];
|
uint8_t op = oprom[pos++];
|
||||||
@ -130,13 +130,3 @@ static offs_t internal_disasm_amis2000(cpu_device *device, std::ostream &stream,
|
|||||||
|
|
||||||
return pos | s_flags[instr] | DASMFLAG_SUPPORTED;
|
return pos | s_flags[instr] | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(amis2000)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_amis2000(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -848,8 +848,8 @@ void apexc_cpu_device::execute_run()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t apexc_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t apexc_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( apexc );
|
extern CPU_DISASSEMBLE( apexc );
|
||||||
return CPU_DISASSEMBLE_NAME(apexc)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(apexc)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 4; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
inline uint32_t apexc_readmem(uint32_t address) { return m_program->read_dword((address)<<2); }
|
inline uint32_t apexc_readmem(uint32_t address) { return m_program->read_dword((address)<<2); }
|
||||||
inline void apexc_writemem(uint32_t address, uint32_t data) { m_program->write_dword((address)<<2, (data)); }
|
inline void apexc_writemem(uint32_t address, uint32_t data) { m_program->write_dword((address)<<2, (data)); }
|
||||||
|
@ -83,7 +83,7 @@ static const instr_desc instructions[16] =
|
|||||||
{ "A", store }, { "S", swap }
|
{ "A", store }, { "S", swap }
|
||||||
};
|
};
|
||||||
|
|
||||||
static offs_t internal_disasm_apexc(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(apexc)
|
||||||
{
|
{
|
||||||
uint32_t instruction; /* 32-bit machine instruction */
|
uint32_t instruction; /* 32-bit machine instruction */
|
||||||
int x, y, function, c6, vector; /* instruction fields */
|
int x, y, function, c6, vector; /* instruction fields */
|
||||||
@ -179,16 +179,5 @@ static offs_t internal_disasm_apexc(cpu_device *device, std::ostream &stream, of
|
|||||||
|
|
||||||
/* print Y address */
|
/* print Y address */
|
||||||
util::stream_format(stream, "%03X(%02d/%02d)", y<<2, (y >> 5) & 0x1f, y & 0x1f); /* 7 chars */
|
util::stream_format(stream, "%03X(%02d/%02d)", y<<2, (y >> 5) & 0x1f, y & 0x1f); /* 7 chars */
|
||||||
|
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(apexc)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_apexc(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -25,10 +25,10 @@ arc_device::arc_device(const machine_config &mconfig, const char *tag, device_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t arc_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t arc_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( arc );
|
extern CPU_DISASSEMBLE( arc );
|
||||||
return CPU_DISASSEMBLE_NAME(arc)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(arc)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 4; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
|
@ -180,7 +180,7 @@ static const char *regnames[0x40] =
|
|||||||
#define ARC_REGOP_SHIMM ((op & 0x000001ff) >> 0 ) // aka D
|
#define ARC_REGOP_SHIMM ((op & 0x000001ff) >> 0 ) // aka D
|
||||||
|
|
||||||
|
|
||||||
static offs_t internal_disasm_arc(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(arc)
|
||||||
{
|
{
|
||||||
uint32_t op = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24);
|
uint32_t op = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24);
|
||||||
op = big_endianize_int32(op);
|
op = big_endianize_int32(op);
|
||||||
@ -207,14 +207,3 @@ static offs_t internal_disasm_arc(cpu_device *device, std::ostream &stream, offs
|
|||||||
|
|
||||||
return 4 | DASMFLAG_SUPPORTED;
|
return 4 | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(arc)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_arc(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -58,10 +58,10 @@ arcompact_device::arcompact_device(const machine_config &mconfig, const char *ta
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t arcompact_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t arcompact_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( arcompact );
|
extern CPU_DISASSEMBLE( arcompact );
|
||||||
return CPU_DISASSEMBLE_NAME(arcompact)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(arcompact)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 8; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 8; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#define ARCOMPACT_OPERATION ((op & 0xf800) >> 11)
|
#define ARCOMPACT_OPERATION ((op & 0xf800) >> 11)
|
||||||
|
|
||||||
static offs_t internal_disasm_arcompact(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(arcompact)
|
||||||
{
|
{
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
@ -87,13 +87,3 @@ static offs_t internal_disasm_arcompact(cpu_device *device, std::ostream &stream
|
|||||||
|
|
||||||
return size | DASMFLAG_SUPPORTED;
|
return size | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(arcompact)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_arcompact(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -1553,15 +1553,15 @@ void arm_cpu_device::HandleCoPro( uint32_t insn )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t arm_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t arm_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( arm );
|
extern CPU_DISASSEMBLE( arm );
|
||||||
return CPU_DISASSEMBLE_NAME(arm)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(arm)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t arm_be_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t arm_be_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( arm_be );
|
extern CPU_DISASSEMBLE( arm_be );
|
||||||
return CPU_DISASSEMBLE_NAME(arm_be)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(arm_be)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 4; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ public:
|
|||||||
arm_be_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
arm_be_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -390,23 +390,14 @@ static uint32_t arm_disasm( std::ostream &stream, uint32_t pc, uint32_t opcode )
|
|||||||
return dasmflags | DASMFLAG_SUPPORTED;
|
return dasmflags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t arm_disasm(char *buffer, uint32_t pc, uint32_t opcode)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
uint32_t result = arm_disasm(stream, pc, opcode);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE( arm )
|
CPU_DISASSEMBLE( arm )
|
||||||
{
|
{
|
||||||
uint32_t opcode = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24);
|
uint32_t opcode = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24);
|
||||||
return 4 | arm_disasm(buffer, pc, opcode);
|
return 4 | arm_disasm(stream, pc, opcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
CPU_DISASSEMBLE( arm_be )
|
CPU_DISASSEMBLE( arm_be )
|
||||||
{
|
{
|
||||||
uint32_t opcode = oprom[3] | (oprom[2] << 8) | (oprom[1] << 16) | (oprom[0] << 24);
|
uint32_t opcode = oprom[3] | (oprom[2] << 8) | (oprom[1] << 16) | (oprom[0] << 24);
|
||||||
return 4 | arm_disasm(buffer, pc, opcode);
|
return 4 | arm_disasm(stream, pc, opcode);
|
||||||
}
|
}
|
||||||
|
@ -764,7 +764,7 @@ void arm7_cpu_device::execute_set_input(int irqline, int state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t arm7_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t arm7_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( arm7arm );
|
extern CPU_DISASSEMBLE( arm7arm );
|
||||||
extern CPU_DISASSEMBLE( arm7thumb );
|
extern CPU_DISASSEMBLE( arm7thumb );
|
||||||
@ -774,16 +774,16 @@ offs_t arm7_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_
|
|||||||
if (T_IS_SET(m_r[eCPSR]))
|
if (T_IS_SET(m_r[eCPSR]))
|
||||||
{
|
{
|
||||||
if ( m_endian == ENDIANNESS_BIG )
|
if ( m_endian == ENDIANNESS_BIG )
|
||||||
return CPU_DISASSEMBLE_NAME(arm7thumb_be)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(arm7thumb_be)(this, stream, pc, oprom, opram, options);
|
||||||
else
|
else
|
||||||
return CPU_DISASSEMBLE_NAME(arm7thumb)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(arm7thumb)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( m_endian == ENDIANNESS_BIG )
|
if ( m_endian == ENDIANNESS_BIG )
|
||||||
return CPU_DISASSEMBLE_NAME(arm7arm_be)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(arm7arm_be)(this, stream, pc, oprom, opram, options);
|
||||||
else
|
else
|
||||||
return CPU_DISASSEMBLE_NAME(arm7arm)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(arm7arm)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
|
|
||||||
|
@ -1300,40 +1300,22 @@ static uint32_t thumb_disasm(std::ostream &stream, uint32_t pc, uint16_t opcode)
|
|||||||
return dasmflags | DASMFLAG_SUPPORTED;
|
return dasmflags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t arm7_disasm(char *buffer, uint32_t pc, uint32_t opcode)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
uint32_t result = arm7_disasm(stream, pc, opcode);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint32_t thumb_disasm(char *buffer, uint32_t pc, uint16_t opcode)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
uint32_t result = thumb_disasm(stream, pc, opcode);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE( arm7arm )
|
CPU_DISASSEMBLE( arm7arm )
|
||||||
{
|
{
|
||||||
return arm7_disasm(buffer, pc, oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24)) | 4;
|
return arm7_disasm(stream, pc, oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24)) | 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPU_DISASSEMBLE( arm7arm_be )
|
CPU_DISASSEMBLE( arm7arm_be )
|
||||||
{
|
{
|
||||||
return arm7_disasm(buffer, pc, oprom[3] | (oprom[2] << 8) | (oprom[1] << 16) | (oprom[0] << 24)) | 4;
|
return arm7_disasm(stream, pc, oprom[3] | (oprom[2] << 8) | (oprom[1] << 16) | (oprom[0] << 24)) | 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPU_DISASSEMBLE( arm7thumb )
|
CPU_DISASSEMBLE( arm7thumb )
|
||||||
{
|
{
|
||||||
return thumb_disasm(buffer, pc, oprom[0] | (oprom[1] << 8)) | 2;
|
return thumb_disasm(stream, pc, oprom[0] | (oprom[1] << 8)) | 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPU_DISASSEMBLE( arm7thumb_be )
|
CPU_DISASSEMBLE( arm7thumb_be )
|
||||||
{
|
{
|
||||||
return thumb_disasm(buffer, pc, oprom[1] | (oprom[0] << 8)) | 2;
|
return thumb_disasm(stream, pc, oprom[1] | (oprom[0] << 8)) | 2;
|
||||||
}
|
}
|
||||||
|
@ -324,10 +324,10 @@ uint32_t asap_device::disasm_max_opcode_bytes() const
|
|||||||
// helper function
|
// helper function
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
offs_t asap_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t asap_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( asap );
|
extern CPU_DISASSEMBLE( asap );
|
||||||
return CPU_DISASSEMBLE_NAME(asap)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(asap)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override;
|
virtual uint32_t disasm_max_opcode_bytes() const override;
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
// helpers
|
// helpers
|
||||||
inline uint32_t readop(offs_t pc);
|
inline uint32_t readop(offs_t pc);
|
||||||
|
@ -45,7 +45,7 @@ static inline char *src2(uint32_t op, int scale)
|
|||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static offs_t internal_disasm_asap(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(asap)
|
||||||
{
|
{
|
||||||
uint32_t op = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24);
|
uint32_t op = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24);
|
||||||
int opcode = op >> 27;
|
int opcode = op >> 27;
|
||||||
@ -141,16 +141,6 @@ static offs_t internal_disasm_asap(cpu_device *device, std::ostream &stream, off
|
|||||||
util::stream_format(stream, "jmp%s %s[%s]", setcond[cond], reg[rsrc1], src2(op,2));
|
util::stream_format(stream, "jmp%s %s[%s]", setcond[cond], reg[rsrc1], src2(op,2));
|
||||||
break;
|
break;
|
||||||
case 0x1f: util::stream_format(stream, "trap $1f"); flags = DASMFLAG_STEP_OVER; break;
|
case 0x1f: util::stream_format(stream, "trap $1f"); flags = DASMFLAG_STEP_OVER; break;
|
||||||
}
|
}
|
||||||
return 4 | flags | DASMFLAG_SUPPORTED;
|
return 4 | flags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(asap)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_asap(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -949,10 +949,10 @@ uint32_t avr8_device::disasm_max_opcode_bytes() const
|
|||||||
// helper function
|
// helper function
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
offs_t avr8_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t avr8_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( avr8 );
|
extern CPU_DISASSEMBLE( avr8 );
|
||||||
return CPU_DISASSEMBLE_NAME(avr8)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(avr8)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override;
|
virtual uint32_t disasm_max_opcode_bytes() const override;
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
// device_state_interface overrides
|
// device_state_interface overrides
|
||||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#define ACONST6(op) ((((op) >> 5) & 0x0030) | ((op) & 0x000f))
|
#define ACONST6(op) ((((op) >> 5) & 0x0030) | ((op) & 0x000f))
|
||||||
#define MULCONST2(op) ((((op) >> 6) & 0x0002) | (((op) >> 3) & 0x0001))
|
#define MULCONST2(op) ((((op) >> 6) & 0x0002) | (((op) >> 3) & 0x0001))
|
||||||
|
|
||||||
static offs_t internal_disasm_avr8(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(avr8)
|
||||||
{
|
{
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
uint32_t op = oprom[pos++];
|
uint32_t op = oprom[pos++];
|
||||||
@ -671,13 +671,3 @@ static offs_t internal_disasm_avr8(cpu_device *device, std::ostream &stream, off
|
|||||||
|
|
||||||
return pos | DASMFLAG_SUPPORTED;
|
return pos | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(avr8)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_avr8(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -687,8 +687,8 @@ void ccpu_cpu_device::execute_run()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t ccpu_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t ccpu_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( ccpu );
|
extern CPU_DISASSEMBLE( ccpu );
|
||||||
return CPU_DISASSEMBLE_NAME(ccpu)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(ccpu)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 3; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 3; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
address_space_config m_data_config;
|
address_space_config m_data_config;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include "ccpu.h"
|
#include "ccpu.h"
|
||||||
|
|
||||||
|
|
||||||
static offs_t internal_disasm_ccpu(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(ccpu)
|
||||||
{
|
{
|
||||||
unsigned startpc = pc;
|
unsigned startpc = pc;
|
||||||
uint8_t opcode = oprom[pc++ - startpc];
|
uint8_t opcode = oprom[pc++ - startpc];
|
||||||
@ -328,13 +328,3 @@ static offs_t internal_disasm_ccpu(cpu_device *device, std::ostream &stream, off
|
|||||||
|
|
||||||
return (pc - startpc) | DASMFLAG_SUPPORTED;
|
return (pc - startpc) | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(ccpu)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_ccpu(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -1171,7 +1171,7 @@ void cop400_cpu_device::state_string_export(const device_state_entry &entry, std
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t cop400_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t cop400_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( cop410 );
|
extern CPU_DISASSEMBLE( cop410 );
|
||||||
extern CPU_DISASSEMBLE( cop420 );
|
extern CPU_DISASSEMBLE( cop420 );
|
||||||
@ -1179,15 +1179,15 @@ offs_t cop400_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint
|
|||||||
|
|
||||||
if ( m_featuremask & COP444_FEATURE )
|
if ( m_featuremask & COP444_FEATURE )
|
||||||
{
|
{
|
||||||
return CPU_DISASSEMBLE_NAME(cop444)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(cop444)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_featuremask & COP420_FEATURE )
|
if ( m_featuremask & COP420_FEATURE )
|
||||||
{
|
{
|
||||||
return CPU_DISASSEMBLE_NAME(cop420)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(cop420)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
return CPU_DISASSEMBLE_NAME(cop410)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(cop410)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
READ8_MEMBER( cop400_cpu_device::microbus_rd )
|
READ8_MEMBER( cop400_cpu_device::microbus_rd )
|
||||||
|
@ -169,7 +169,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 2; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 2; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
address_space_config m_data_config;
|
address_space_config m_data_config;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
|
|
||||||
static offs_t internal_disasm_cop410(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(cop410)
|
||||||
{
|
{
|
||||||
uint8_t opcode = oprom[0];
|
uint8_t opcode = oprom[0];
|
||||||
uint8_t next_opcode = oprom[1];
|
uint8_t next_opcode = oprom[1];
|
||||||
@ -348,13 +348,3 @@ static offs_t internal_disasm_cop410(cpu_device *device, std::ostream &stream, o
|
|||||||
|
|
||||||
return bytes | flags | DASMFLAG_SUPPORTED;
|
return bytes | flags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(cop410)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_cop410(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
|
|
||||||
static offs_t internal_disasm_cop420(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(cop420)
|
||||||
{
|
{
|
||||||
uint8_t opcode = oprom[0];
|
uint8_t opcode = oprom[0];
|
||||||
uint8_t next_opcode = oprom[1];
|
uint8_t next_opcode = oprom[1];
|
||||||
@ -396,13 +396,3 @@ static offs_t internal_disasm_cop420(cpu_device *device, std::ostream &stream, o
|
|||||||
|
|
||||||
return bytes | flags | DASMFLAG_SUPPORTED;
|
return bytes | flags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(cop420)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_cop420(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
|
|
||||||
static offs_t internal_disasm_cop444(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(cop444)
|
||||||
{
|
{
|
||||||
uint8_t opcode = oprom[0];
|
uint8_t opcode = oprom[0];
|
||||||
uint8_t next_opcode = oprom[1];
|
uint8_t next_opcode = oprom[1];
|
||||||
@ -413,13 +413,3 @@ static offs_t internal_disasm_cop444(cpu_device *device, std::ostream &stream, o
|
|||||||
|
|
||||||
return bytes | flags | DASMFLAG_SUPPORTED;
|
return bytes | flags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(cop444)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_cop444(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -185,23 +185,13 @@ static uint32_t disassemble(device_t *device, std::ostream &stream, offs_t pc, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static uint32_t disassemble(device_t *device, char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t variant)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
uint32_t result = disassemble(device, stream, pc, oprom, opram, variant);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE( cdp1801 )
|
CPU_DISASSEMBLE( cdp1801 )
|
||||||
{
|
{
|
||||||
return disassemble(device, buffer, pc, oprom, opram, TYPE_1801);
|
return disassemble(device, stream, pc, oprom, opram, TYPE_1801);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE( cdp1802 )
|
CPU_DISASSEMBLE( cdp1802 )
|
||||||
{
|
{
|
||||||
return disassemble(device, buffer, pc, oprom, opram, TYPE_1802);
|
return disassemble(device, stream, pc, oprom, opram, TYPE_1802);
|
||||||
}
|
}
|
||||||
|
@ -512,16 +512,16 @@ uint32_t cosmac_device::disasm_max_opcode_bytes() const
|
|||||||
// helper function
|
// helper function
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
offs_t cdp1801_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t cdp1801_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( cdp1801 );
|
extern CPU_DISASSEMBLE( cdp1801 );
|
||||||
return CPU_DISASSEMBLE_NAME( cdp1801 )(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME( cdp1801 )(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
offs_t cdp1802_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t cdp1802_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( cdp1802 );
|
extern CPU_DISASSEMBLE( cdp1802 );
|
||||||
return CPU_DISASSEMBLE_NAME( cdp1802 )(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME( cdp1802 )(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -451,7 +451,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
virtual cosmac_device::ophandler get_ophandler(uint8_t opcode) override;
|
virtual cosmac_device::ophandler get_ophandler(uint8_t opcode) override;
|
||||||
|
|
||||||
@ -469,7 +469,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
virtual cosmac_device::ophandler get_ophandler(uint8_t opcode) override;
|
virtual cosmac_device::ophandler get_ophandler(uint8_t opcode) override;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include "debugger.h"
|
#include "debugger.h"
|
||||||
#include "cp1610.h"
|
#include "cp1610.h"
|
||||||
|
|
||||||
static offs_t internal_disasm_cp1610(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(cp1610)
|
||||||
{
|
{
|
||||||
uint16_t oprom16[4]={ static_cast<uint16_t>((oprom[0] << 8) | oprom[1]), static_cast<uint16_t>((oprom[2] << 8) | oprom[3]), static_cast<uint16_t>((oprom[4] << 8) | oprom[5]), static_cast<uint16_t>((oprom[6] << 8) | oprom[7]) };
|
uint16_t oprom16[4]={ static_cast<uint16_t>((oprom[0] << 8) | oprom[1]), static_cast<uint16_t>((oprom[2] << 8) | oprom[3]), static_cast<uint16_t>((oprom[4] << 8) | oprom[5]), static_cast<uint16_t>((oprom[6] << 8) | oprom[7]) };
|
||||||
uint16_t op = oprom16[0]; uint16_t subop;
|
uint16_t op = oprom16[0]; uint16_t subop;
|
||||||
@ -1488,13 +1488,3 @@ static offs_t internal_disasm_cp1610(cpu_device *device, std::ostream &stream, o
|
|||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(cp1610)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_cp1610(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -3417,8 +3417,8 @@ void cp1610_cpu_device::state_string_export(const device_state_entry &entry, std
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t cp1610_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t cp1610_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( cp1610 );
|
extern CPU_DISASSEMBLE( cp1610 );
|
||||||
return CPU_DISASSEMBLE_NAME(cp1610)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(cp1610)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 8; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 8; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
|
@ -58,7 +58,7 @@ static const char *const dst[] =
|
|||||||
SOUND DISASSEMBLY HOOK
|
SOUND DISASSEMBLY HOOK
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static offs_t internal_disasm_cquestsnd(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(cquestsnd)
|
||||||
{
|
{
|
||||||
static const char *const jmps[] =
|
static const char *const jmps[] =
|
||||||
{
|
{
|
||||||
@ -125,21 +125,11 @@ static offs_t internal_disasm_cquestsnd(cpu_device *device, std::ostream &stream
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(cquestsnd)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_cquestsnd(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
ROTATE DISASSEMBLY HOOK
|
ROTATE DISASSEMBLY HOOK
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static offs_t internal_disasm_cquestrot(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(cquestrot)
|
||||||
{
|
{
|
||||||
static const char *const jmps[] =
|
static const char *const jmps[] =
|
||||||
{
|
{
|
||||||
@ -231,21 +221,11 @@ static offs_t internal_disasm_cquestrot(cpu_device *device, std::ostream &stream
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(cquestrot)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_cquestrot(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
LINE DRAWER DISASSEMBLY HOOK
|
LINE DRAWER DISASSEMBLY HOOK
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static offs_t internal_disasm_cquestlin(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(cquestlin)
|
||||||
{
|
{
|
||||||
static const char *const jmps[] =
|
static const char *const jmps[] =
|
||||||
{
|
{
|
||||||
@ -325,13 +305,3 @@ static offs_t internal_disasm_cquestlin(cpu_device *device, std::ostream &stream
|
|||||||
|
|
||||||
return 1 | DASMFLAG_SUPPORTED;
|
return 1 | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(cquestlin)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_cquestlin(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -84,10 +84,10 @@ cquestsnd_cpu_device::cquestsnd_cpu_device(const machine_config &mconfig, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t cquestsnd_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t cquestsnd_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( cquestsnd );
|
extern CPU_DISASSEMBLE( cquestsnd );
|
||||||
return CPU_DISASSEMBLE_NAME(cquestsnd)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(cquestsnd)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -105,10 +105,10 @@ READ16_MEMBER( cquestrot_cpu_device::linedata_r )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t cquestrot_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t cquestrot_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( cquestrot );
|
extern CPU_DISASSEMBLE( cquestrot );
|
||||||
return CPU_DISASSEMBLE_NAME(cquestrot)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(cquestrot)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -122,10 +122,10 @@ cquestlin_cpu_device::cquestlin_cpu_device(const machine_config &mconfig, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t cquestlin_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t cquestlin_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( cquestlin );
|
extern CPU_DISASSEMBLE( cquestlin );
|
||||||
return CPU_DISASSEMBLE_NAME(cquestlin)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(cquestlin)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 8; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 8; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 8; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 8; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
@ -237,7 +237,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 8; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 8; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 8; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 8; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
@ -321,7 +321,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 8; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 8; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 8; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 8; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
|
@ -348,10 +348,10 @@ uint32_t dsp16_device::disasm_max_opcode_bytes() const
|
|||||||
// helper function
|
// helper function
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
offs_t dsp16_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t dsp16_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( dsp16a );
|
extern CPU_DISASSEMBLE( dsp16a );
|
||||||
return CPU_DISASSEMBLE_NAME(dsp16a)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(dsp16a)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override;
|
virtual uint32_t disasm_max_opcode_bytes() const override;
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
// address spaces
|
// address spaces
|
||||||
const address_space_config m_program_config;
|
const address_space_config m_program_config;
|
||||||
|
@ -248,7 +248,7 @@ bool disasmSIField(const uint8_t& SI)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static offs_t internal_disasm_dsp16a(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(dsp16a)
|
||||||
{
|
{
|
||||||
uint8_t opSize = 1;
|
uint8_t opSize = 1;
|
||||||
uint32_t dasmflags = 0;
|
uint32_t dasmflags = 0;
|
||||||
@ -584,13 +584,3 @@ static offs_t internal_disasm_dsp16a(cpu_device *device, std::ostream &stream, o
|
|||||||
|
|
||||||
return opSize | dasmflags | DASMFLAG_SUPPORTED;
|
return opSize | dasmflags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(dsp16a)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_dsp16a(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -421,10 +421,10 @@ uint32_t dsp32c_device::disasm_max_opcode_bytes() const
|
|||||||
// helper function
|
// helper function
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
offs_t dsp32c_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t dsp32c_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( dsp32c );
|
extern CPU_DISASSEMBLE( dsp32c );
|
||||||
return CPU_DISASSEMBLE_NAME(dsp32c)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(dsp32c)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override;
|
virtual uint32_t disasm_max_opcode_bytes() const override;
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
// memory accessors
|
// memory accessors
|
||||||
uint32_t ROPCODE(offs_t pc);
|
uint32_t ROPCODE(offs_t pc);
|
||||||
|
@ -694,21 +694,11 @@ static unsigned dasm_dsp32(std::ostream &stream, unsigned pc, uint32_t op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static unsigned dasm_dsp32(char *buffer, unsigned pc, uint32_t op)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
unsigned result = dasm_dsp32(stream, pc, op);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
DISASSEMBLY HOOK
|
DISASSEMBLY HOOK
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
CPU_DISASSEMBLE( dsp32c )
|
CPU_DISASSEMBLE( dsp32c )
|
||||||
{
|
{
|
||||||
return dasm_dsp32(buffer, pc, oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24));
|
return dasm_dsp32(stream, pc, oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24));
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
/*****************************/
|
/*****************************/
|
||||||
/* Main disassembly function */
|
/* Main disassembly function */
|
||||||
/*****************************/
|
/*****************************/
|
||||||
static offs_t internal_disasm_dsp56k(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(dsp56k)
|
||||||
{
|
{
|
||||||
const uint16_t w0 = oprom[0] | (oprom[1] << 8);
|
const uint16_t w0 = oprom[0] | (oprom[1] << 8);
|
||||||
const uint16_t w1 = oprom[2] | (oprom[3] << 8);
|
const uint16_t w1 = oprom[2] | (oprom[3] << 8);
|
||||||
@ -28,13 +28,3 @@ static offs_t internal_disasm_dsp56k(cpu_device *device, std::ostream &stream, o
|
|||||||
const unsigned size = op.size();
|
const unsigned size = op.size();
|
||||||
return (size | DASMFLAG_SUPPORTED);
|
return (size | DASMFLAG_SUPPORTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(dsp56k)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_dsp56k(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -494,8 +494,8 @@ void dsp56k_device::execute_run()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t dsp56k_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t dsp56k_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( dsp56k );
|
extern CPU_DISASSEMBLE( dsp56k );
|
||||||
return CPU_DISASSEMBLE_NAME(dsp56k)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(dsp56k)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
|
@ -40,10 +40,10 @@ void e0c6200_cpu_device::state_string_export(const device_state_entry &entry, st
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
offs_t e0c6200_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t e0c6200_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE(e0c6200);
|
extern CPU_DISASSEMBLE(e0c6200);
|
||||||
return CPU_DISASSEMBLE_NAME(e0c6200)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(e0c6200)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 2; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 2; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||||
|
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
|
@ -110,7 +110,7 @@ static char* decode_param(uint16_t opcode, int param, char* buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static offs_t internal_disasm_e0c6200(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(e0c6200)
|
||||||
{
|
{
|
||||||
uint16_t op = (oprom[1] | oprom[0] << 8) & 0xfff;
|
uint16_t op = (oprom[1] | oprom[0] << 8) & 0xfff;
|
||||||
|
|
||||||
@ -705,13 +705,3 @@ static offs_t internal_disasm_e0c6200(cpu_device *device, std::ostream &stream,
|
|||||||
|
|
||||||
return 1 | em_flags[m] | DASMFLAG_SUPPORTED;
|
return 1 | em_flags[m] | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(e0c6200)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_e0c6200(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -2136,16 +2136,7 @@ unsigned dasm_hyperstone(std::ostream &stream, unsigned pc, const uint8_t *oprom
|
|||||||
return size | flags | DASMFLAG_SUPPORTED;
|
return size | flags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned dasm_hyperstone(char *buffer, unsigned pc, const uint8_t *oprom, unsigned h_flag, int private_fp)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
unsigned result = dasm_hyperstone(stream, pc, oprom, h_flag, private_fp);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE( hyperstone_generic )
|
CPU_DISASSEMBLE( hyperstone_generic )
|
||||||
{
|
{
|
||||||
return dasm_hyperstone( buffer, pc, oprom, 0, 0 );
|
return dasm_hyperstone( stream, pc, oprom, 0, 0 );
|
||||||
}
|
}
|
||||||
|
@ -1904,13 +1904,10 @@ uint32_t hyperstone_device::disasm_max_opcode_bytes() const
|
|||||||
// helper function
|
// helper function
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
offs_t hyperstone_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t hyperstone_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
std::ostringstream stream;
|
extern CPU_DISASSEMBLE( hyperstone );
|
||||||
offs_t result = dasm_hyperstone(stream, pc, oprom, GET_H, GET_FP);
|
return dasm_hyperstone(stream, pc, oprom, GET_H, GET_FP );
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Opcodes */
|
/* Opcodes */
|
||||||
|
@ -238,7 +238,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override;
|
virtual uint32_t disasm_max_opcode_bytes() const override;
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
// device_state_interface overrides
|
// device_state_interface overrides
|
||||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||||
|
@ -933,7 +933,7 @@ uint32_t es5510_device::disasm_max_opcode_bytes() const
|
|||||||
return 6;
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
offs_t es5510_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t es5510_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
return pc;
|
return pc;
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ protected:
|
|||||||
virtual void execute_run() override;
|
virtual void execute_run() override;
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override;
|
virtual uint32_t disasm_max_opcode_bytes() const override;
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
virtual void execute_set_input(int linenum, int state) override;
|
virtual void execute_set_input(int linenum, int state) override;
|
||||||
|
|
||||||
int32_t alu_operation(uint8_t op, int32_t aValue, int32_t bValue, uint8_t &flags);
|
int32_t alu_operation(uint8_t op, int32_t aValue, int32_t bValue, uint8_t &flags);
|
||||||
|
@ -398,10 +398,10 @@ uint32_t esrip_device::disasm_max_opcode_bytes() const
|
|||||||
// helper function
|
// helper function
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
offs_t esrip_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t esrip_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( esrip );
|
extern CPU_DISASSEMBLE( esrip );
|
||||||
return CPU_DISASSEMBLE_NAME(esrip)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(esrip)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override;
|
virtual uint32_t disasm_max_opcode_bytes() const override;
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
// device_state_interface overrides
|
// device_state_interface overrides
|
||||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
DISASSEMBLY HOOK (TODO: FINISH)
|
DISASSEMBLY HOOK (TODO: FINISH)
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
static offs_t internal_disasm_esrip(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(esrip)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
static const char* const jmp_types[] =
|
static const char* const jmp_types[] =
|
||||||
@ -93,13 +93,3 @@ static offs_t internal_disasm_esrip(cpu_device *device, std::ostream &stream, of
|
|||||||
|
|
||||||
return 1 | DASMFLAG_SUPPORTED;
|
return 1 | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(esrip)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_esrip(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -2062,10 +2062,10 @@ void f8_cpu_device::state_string_export(const device_state_entry &entry, std::st
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t f8_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t f8_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( f8 );
|
extern CPU_DISASSEMBLE( f8 );
|
||||||
return CPU_DISASSEMBLE_NAME(f8)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(f8)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 3; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 3; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
|
@ -9,7 +9,7 @@ static const char *const rname[16] = {
|
|||||||
"R8", "J", "HU", "HL", "KU", "KL", "QU", "QL"
|
"R8", "J", "HU", "HL", "KU", "KL", "QU", "QL"
|
||||||
};
|
};
|
||||||
|
|
||||||
static offs_t internal_disasm_f8(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(f8)
|
||||||
{
|
{
|
||||||
unsigned size = 0;
|
unsigned size = 0;
|
||||||
uint8_t op = oprom[size++];
|
uint8_t op = oprom[size++];
|
||||||
@ -532,13 +532,3 @@ static offs_t internal_disasm_f8(cpu_device *device, std::ostream &stream, offs_
|
|||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(f8)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_f8(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -759,14 +759,14 @@ void g65816_device::execute_set_input(int line, int state)
|
|||||||
#include "g65816ds.h"
|
#include "g65816ds.h"
|
||||||
|
|
||||||
|
|
||||||
offs_t g65816_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t g65816_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
return g65816_disassemble(buffer, (pc & 0x00ffff), (pc & 0xff0000) >> 16, oprom, FLAG_M, FLAG_X);
|
return g65816_disassemble(stream, (pc & 0x00ffff), (pc & 0xff0000) >> 16, oprom, FLAG_M, FLAG_X);
|
||||||
}
|
}
|
||||||
|
|
||||||
CPU_DISASSEMBLE( g65816 )
|
CPU_DISASSEMBLE( g65816 )
|
||||||
{
|
{
|
||||||
return g65816_disassemble(buffer, (pc & 0x00ffff), (pc & 0xff0000) >> 16, oprom, 0/*FLAG_M*/, 0/*FLAG_X*/);
|
return g65816_disassemble(stream, (pc & 0x00ffff), (pc & 0xff0000) >> 16, oprom, 0/*FLAG_M*/, 0/*FLAG_X*/);
|
||||||
}
|
}
|
||||||
|
|
||||||
void g65816_device::g65816_restore_state()
|
void g65816_device::g65816_restore_state()
|
||||||
|
@ -87,7 +87,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
address_space_config m_program_config;
|
address_space_config m_program_config;
|
||||||
|
|
||||||
|
@ -382,16 +382,7 @@ unsigned g65816_disassemble(std::ostream &stream, unsigned int pc, unsigned int
|
|||||||
return length | DASMFLAG_SUPPORTED | dasm_flags;
|
return length | DASMFLAG_SUPPORTED | dasm_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned g65816_disassemble(char *buffer, unsigned int pc, unsigned int pb, const uint8_t *oprom, int m_flag, int x_flag)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
unsigned result = g65816_disassemble(stream, pc, pb, oprom, m_flag, x_flag);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE( g65816_generic )
|
CPU_DISASSEMBLE( g65816_generic )
|
||||||
{
|
{
|
||||||
return g65816_disassemble(buffer, (pc & 0x00ffff), (pc & 0xff0000) >> 16, oprom, 0, 0);
|
return g65816_disassemble(stream, (pc & 0x00ffff), (pc & 0xff0000) >> 16, oprom, 0, 0);
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ All rights reserved.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
unsigned g65816_disassemble(std::ostream &stream, unsigned int pc, unsigned int pb, const uint8_t *oprom, int m_flag, int x_flag);
|
unsigned g65816_disassemble(std::ostream &stream, unsigned int pc, unsigned int pb, const uint8_t *oprom, int m_flag, int x_flag);
|
||||||
unsigned g65816_disassemble(char *buffer, unsigned int pc, unsigned int pb, const uint8_t *oprom, int m_flag, int x_flag);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __G65816DS_H__ */
|
#endif /* __G65816DS_H__ */
|
||||||
|
@ -144,7 +144,7 @@ static const unsigned char op6280[512]=
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Disassemble a single command and return the number of bytes it uses.
|
* Disassemble a single command and return the number of bytes it uses.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
static offs_t internal_disasm_h6280(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(h6280)
|
||||||
{
|
{
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
int PC, OP, opc, arg;
|
int PC, OP, opc, arg;
|
||||||
@ -249,16 +249,6 @@ static offs_t internal_disasm_h6280(cpu_device *device, std::ostream &stream, of
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
util::stream_format(stream, "%-5s$%02X", token[opc], OP >> 1);
|
util::stream_format(stream, "%-5s$%02X", token[opc], OP >> 1);
|
||||||
}
|
}
|
||||||
return (PC - pc) | flags | DASMFLAG_SUPPORTED;
|
return (PC - pc) | flags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(h6280)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_h6280(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -2238,10 +2238,10 @@ uint32_t h6280_device::disasm_max_opcode_bytes() const
|
|||||||
// helper function
|
// helper function
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
offs_t h6280_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t h6280_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( h6280 );
|
extern CPU_DISASSEMBLE( h6280 );
|
||||||
return CPU_DISASSEMBLE_NAME(h6280)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(h6280)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override;
|
virtual uint32_t disasm_max_opcode_bytes() const override;
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
// device_state_interface overrides
|
// device_state_interface overrides
|
||||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||||
|
@ -568,18 +568,9 @@ offs_t h8_device::disassemble_generic(std::ostream &stream, offs_t pc, const uin
|
|||||||
return e.flags | DASMFLAG_SUPPORTED;
|
return e.flags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
offs_t h8_device::disassemble_generic(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options, const disasm_entry *table)
|
offs_t h8_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
std::ostringstream stream;
|
return disassemble_generic(stream, pc, oprom, opram, options, disasm_entries);
|
||||||
offs_t result = disassemble_generic(stream, pc, oprom, opram, options, table);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
offs_t h8_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
|
||||||
{
|
|
||||||
return disassemble_generic(buffer, pc, oprom, opram, options, disasm_entries);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t h8_device::read16i(uint32_t adr)
|
uint16_t h8_device::read16i(uint32_t adr)
|
||||||
|
@ -175,7 +175,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override;
|
virtual uint32_t disasm_min_opcode_bytes() const override;
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override;
|
virtual uint32_t disasm_max_opcode_bytes() const override;
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
address_space_config program_config, io_config;
|
address_space_config program_config, io_config;
|
||||||
address_space *program, *io;
|
address_space *program, *io;
|
||||||
@ -209,7 +209,6 @@ protected:
|
|||||||
static const disasm_entry disasm_entries[];
|
static const disasm_entry disasm_entries[];
|
||||||
|
|
||||||
offs_t disassemble_generic(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options, const disasm_entry *table);
|
offs_t disassemble_generic(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options, const disasm_entry *table);
|
||||||
offs_t disassemble_generic(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options, const disasm_entry *table);
|
|
||||||
void disassemble_am(std::ostream &stream, int am, offs_t pc, const uint8_t *oprom, uint32_t opcode, int slot, int offset);
|
void disassemble_am(std::ostream &stream, int am, offs_t pc, const uint8_t *oprom, uint32_t opcode, int slot, int offset);
|
||||||
|
|
||||||
virtual void do_exec_full();
|
virtual void do_exec_full();
|
||||||
|
@ -10,9 +10,9 @@ h8h_device::h8h_device(const machine_config &mconfig, device_type type, const ch
|
|||||||
mode_advanced = true;
|
mode_advanced = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
offs_t h8h_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t h8h_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
return disassemble_generic(buffer, pc, oprom, opram, options, disasm_entries);
|
return disassemble_generic(stream, pc, oprom, opram, options, disasm_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "cpu/h8/h8h.hxx"
|
#include "cpu/h8/h8h.hxx"
|
||||||
|
@ -23,7 +23,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
static const disasm_entry disasm_entries[];
|
static const disasm_entry disasm_entries[];
|
||||||
|
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
virtual void do_exec_full() override;
|
virtual void do_exec_full() override;
|
||||||
virtual void do_exec_partial() override;
|
virtual void do_exec_partial() override;
|
||||||
|
@ -9,9 +9,9 @@ h8s2000_device::h8s2000_device(const machine_config &mconfig, device_type type,
|
|||||||
has_exr = true;
|
has_exr = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
offs_t h8s2000_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t h8s2000_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
return disassemble_generic(buffer, pc, oprom, opram, options, disasm_entries);
|
return disassemble_generic(stream, pc, oprom, opram, options, disasm_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "cpu/h8/h8s2000.hxx"
|
#include "cpu/h8/h8s2000.hxx"
|
||||||
|
@ -25,7 +25,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
static const disasm_entry disasm_entries[];
|
static const disasm_entry disasm_entries[];
|
||||||
|
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
virtual void do_exec_full() override;
|
virtual void do_exec_full() override;
|
||||||
virtual void do_exec_partial() override;
|
virtual void do_exec_partial() override;
|
||||||
|
@ -8,9 +8,9 @@ h8s2600_device::h8s2600_device(const machine_config &mconfig, device_type type,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
offs_t h8s2600_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t h8s2600_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
return disassemble_generic(buffer, pc, oprom, opram, options, disasm_entries);
|
return disassemble_generic(stream, pc, oprom, opram, options, disasm_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "cpu/h8/h8s2600.hxx"
|
#include "cpu/h8/h8s2600.hxx"
|
||||||
|
@ -23,7 +23,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
static const disasm_entry disasm_entries[];
|
static const disasm_entry disasm_entries[];
|
||||||
|
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
virtual void do_exec_full() override;
|
virtual void do_exec_full() override;
|
||||||
virtual void do_exec_partial() override;
|
virtual void do_exec_partial() override;
|
||||||
|
@ -525,8 +525,8 @@ void hcd62121_cpu_device::execute_run()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
offs_t hcd62121_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t hcd62121_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( hcd62121 );
|
extern CPU_DISASSEMBLE( hcd62121 );
|
||||||
return CPU_DISASSEMBLE_NAME(hcd62121)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(hcd62121)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 18; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 18; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
uint8_t read_op();
|
uint8_t read_op();
|
||||||
uint8_t datasize( uint8_t op );
|
uint8_t datasize( uint8_t op );
|
||||||
|
@ -129,7 +129,7 @@ static const hcd62121_dasm hcd62121_ops[256] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static offs_t internal_disasm_hcd62121(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(hcd62121)
|
||||||
{
|
{
|
||||||
uint8_t op;
|
uint8_t op;
|
||||||
uint8_t op1;
|
uint8_t op1;
|
||||||
@ -357,12 +357,3 @@ static offs_t internal_disasm_hcd62121(cpu_device *device, std::ostream &stream,
|
|||||||
return pos | DASMFLAG_SUPPORTED;
|
return pos | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(hcd62121)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_hcd62121(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -292,10 +292,10 @@ void hd61700_cpu_device::state_string_export(const device_state_entry &entry, st
|
|||||||
// helper function
|
// helper function
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
offs_t hd61700_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t hd61700_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE( hd61700 );
|
extern CPU_DISASSEMBLE( hd61700 );
|
||||||
return CPU_DISASSEMBLE_NAME(hd61700)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(hd61700)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ protected:
|
|||||||
// device_disasm_interface overrides
|
// device_disasm_interface overrides
|
||||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
|
||||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 16; }
|
virtual uint32_t disasm_max_opcode_bytes() const override { return 16; }
|
||||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
|
||||||
|
|
||||||
// interrupts
|
// interrupts
|
||||||
bool check_irqs(void);
|
bool check_irqs(void);
|
||||||
|
@ -392,7 +392,7 @@ uint32_t get_dasmflags(uint8_t op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static offs_t internal_disasm_hd61700(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
CPU_DISASSEMBLE(hd61700)
|
||||||
{
|
{
|
||||||
const hd61700_dasm *inst;
|
const hd61700_dasm *inst;
|
||||||
uint32_t dasmflags;
|
uint32_t dasmflags;
|
||||||
@ -433,13 +433,3 @@ static offs_t internal_disasm_hd61700(cpu_device *device, std::ostream &stream,
|
|||||||
|
|
||||||
return (pos>>1) | dasmflags | DASMFLAG_SUPPORTED;
|
return (pos>>1) | dasmflags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CPU_DISASSEMBLE(hd61700)
|
|
||||||
{
|
|
||||||
std::ostringstream stream;
|
|
||||||
offs_t result = internal_disasm_hd61700(device, stream, pc, oprom, opram, options);
|
|
||||||
std::string stream_str = stream.str();
|
|
||||||
strcpy(buffer, stream_str.c_str());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
@ -148,10 +148,10 @@ void hmcs40_cpu_device::state_string_export(const device_state_entry &entry, std
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
offs_t hmcs40_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
offs_t hmcs40_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
|
||||||
{
|
{
|
||||||
extern CPU_DISASSEMBLE(hmcs40);
|
extern CPU_DISASSEMBLE(hmcs40);
|
||||||
return CPU_DISASSEMBLE_NAME(hmcs40)(this, buffer, pc, oprom, opram, options);
|
return CPU_DISASSEMBLE_NAME(hmcs40)(this, stream, pc, oprom, opram, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user