summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/8x300
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/8x300
parent5eefcfdb684b94cbe41d41a7dcfd8b712bf86c6a (diff)
Changed disassembler infrastructure to not use char buffers internally
Diffstat (limited to 'src/devices/cpu/8x300')
-rw-r--r--src/devices/cpu/8x300/8x300.cpp4
-rw-r--r--src/devices/cpu/8x300/8x300.h2
-rw-r--r--src/devices/cpu/8x300/8x300dasm.cpp12
3 files changed, 4 insertions, 14 deletions
diff --git a/src/devices/cpu/8x300/8x300.cpp b/src/devices/cpu/8x300/8x300.cpp
index 827c064783a..c9ec6839e9e 100644
--- a/src/devices/cpu/8x300/8x300.cpp
+++ b/src/devices/cpu/8x300/8x300.cpp
@@ -581,8 +581,8 @@ void n8x300_cpu_device::execute_run()
} 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 );
- return CPU_DISASSEMBLE_NAME(n8x300)(this, buffer, pc, oprom, opram, options);
+ return CPU_DISASSEMBLE_NAME(n8x300)(this, stream, pc, oprom, opram, options);
}
diff --git a/src/devices/cpu/8x300/8x300.h b/src/devices/cpu/8x300/8x300.h
index 286701142f9..45d3f71cd91 100644
--- a/src/devices/cpu/8x300/8x300.h
+++ b/src/devices/cpu/8x300/8x300.h
@@ -73,7 +73,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 u8 *oprom, const u8 *opram, u32 options) override;
address_space_config m_program_config;
address_space_config m_io_config;
diff --git a/src/devices/cpu/8x300/8x300dasm.cpp b/src/devices/cpu/8x300/8x300dasm.cpp
index 5b66dbd1f05..db6f3d2cd00 100644
--- a/src/devices/cpu/8x300/8x300dasm.cpp
+++ b/src/devices/cpu/8x300/8x300dasm.cpp
@@ -41,7 +41,7 @@ static inline bool is_src_rot(uint16_t opcode)
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;
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);
}
-
-
-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;
-}