summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/cp1610
diff options
context:
space:
mode:
author Nathan Woods <npwoods@mess.org>2016-11-20 08:49:30 -0500
committer Nathan Woods <npwoods@mess.org>2016-11-20 08:49:30 -0500
commita29891d2e5b750e47a1237929c42fc2afdd8f094 (patch)
treea601af0a86b6076311a7af4494a7b66bb8d24667 /src/devices/cpu/cp1610
parent5eefcfdb684b94cbe41d41a7dcfd8b712bf86c6a (diff)
Changed disassembler infrastructure to not use char buffers internally
Diffstat (limited to 'src/devices/cpu/cp1610')
-rw-r--r--src/devices/cpu/cp1610/1610dasm.cpp12
-rw-r--r--src/devices/cpu/cp1610/cp1610.cpp4
-rw-r--r--src/devices/cpu/cp1610/cp1610.h2
3 files changed, 4 insertions, 14 deletions
diff --git a/src/devices/cpu/cp1610/1610dasm.cpp b/src/devices/cpu/cp1610/1610dasm.cpp
index 5a2daf2cbfe..0e9ed461dd3 100644
--- a/src/devices/cpu/cp1610/1610dasm.cpp
+++ b/src/devices/cpu/cp1610/1610dasm.cpp
@@ -4,7 +4,7 @@
#include "debugger.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 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;
}
-
-
-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;
-}
diff --git a/src/devices/cpu/cp1610/cp1610.cpp b/src/devices/cpu/cp1610/cp1610.cpp
index 9c2ed837b3b..b2b923fbc8f 100644
--- a/src/devices/cpu/cp1610/cp1610.cpp
+++ b/src/devices/cpu/cp1610/cp1610.cpp
@@ -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 );
- return CPU_DISASSEMBLE_NAME(cp1610)(this, buffer, pc, oprom, opram, options);
+ return CPU_DISASSEMBLE_NAME(cp1610)(this, stream, pc, oprom, opram, options);
}
diff --git a/src/devices/cpu/cp1610/cp1610.h b/src/devices/cpu/cp1610/cp1610.h
index cec2c567776..545c37fbb83 100644
--- a/src/devices/cpu/cp1610/cp1610.h
+++ b/src/devices/cpu/cp1610/cp1610.h
@@ -61,7 +61,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 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:
address_space_config m_program_config;