summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/e0c6200
diff options
context:
space:
mode:
author Vas Crabb <cuavas@users.noreply.github.com>2016-11-21 11:30:06 +1100
committer GitHub <noreply@github.com>2016-11-21 11:30:06 +1100
commitb8b0774997e7a898c53479b1d7e4860a0d4dc1e8 (patch)
tree07e199d26412bf36d0dc75e0645510c20ac691f2 /src/devices/cpu/e0c6200
parent9b197f3d5556e1e2808fe82fc970a04a4e84a034 (diff)
parent68a115369194cb7b859ce53ed2d9a201278d3430 (diff)
Merge pull request #1317 from npwoods/disasm_stdstring
Refactored device_disasm_interface::disassemble() and dasm_override_delegate to take string buffers as std::string
Diffstat (limited to 'src/devices/cpu/e0c6200')
-rw-r--r--src/devices/cpu/e0c6200/e0c6200.cpp4
-rw-r--r--src/devices/cpu/e0c6200/e0c6200.h2
-rw-r--r--src/devices/cpu/e0c6200/e0c6200d.cpp12
3 files changed, 4 insertions, 14 deletions
diff --git a/src/devices/cpu/e0c6200/e0c6200.cpp b/src/devices/cpu/e0c6200/e0c6200.cpp
index 9cc9468429d..a7ccf514438 100644
--- a/src/devices/cpu/e0c6200/e0c6200.cpp
+++ b/src/devices/cpu/e0c6200/e0c6200.cpp
@@ -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);
- return CPU_DISASSEMBLE_NAME(e0c6200)(this, buffer, pc, oprom, opram, options);
+ return CPU_DISASSEMBLE_NAME(e0c6200)(this, stream, pc, oprom, opram, options);
}
diff --git a/src/devices/cpu/e0c6200/e0c6200.h b/src/devices/cpu/e0c6200/e0c6200.h
index cc23c0b1897..e1b95d0381c 100644
--- a/src/devices/cpu/e0c6200/e0c6200.h
+++ b/src/devices/cpu/e0c6200/e0c6200.h
@@ -43,7 +43,7 @@ protected:
// device_disasm_interface overrides
virtual uint32_t disasm_min_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;
address_space_config m_program_config;
diff --git a/src/devices/cpu/e0c6200/e0c6200d.cpp b/src/devices/cpu/e0c6200/e0c6200d.cpp
index 62cbfab9ad5..eb8c4d55091 100644
--- a/src/devices/cpu/e0c6200/e0c6200d.cpp
+++ b/src/devices/cpu/e0c6200/e0c6200d.cpp
@@ -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;
@@ -705,13 +705,3 @@ static offs_t internal_disasm_e0c6200(cpu_device *device, std::ostream &stream,
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;
-}