diff options
author | 2016-11-20 08:49:30 -0500 | |
---|---|---|
committer | 2016-11-20 08:49:30 -0500 | |
commit | a29891d2e5b750e47a1237929c42fc2afdd8f094 (patch) | |
tree | a601af0a86b6076311a7af4494a7b66bb8d24667 /src/devices/cpu/pps4 | |
parent | 5eefcfdb684b94cbe41d41a7dcfd8b712bf86c6a (diff) |
Changed disassembler infrastructure to not use char buffers internally
Diffstat (limited to 'src/devices/cpu/pps4')
-rw-r--r-- | src/devices/cpu/pps4/pps4.cpp | 4 | ||||
-rw-r--r-- | src/devices/cpu/pps4/pps4.h | 2 | ||||
-rw-r--r-- | src/devices/cpu/pps4/pps4dasm.cpp | 11 |
3 files changed, 4 insertions, 13 deletions
diff --git a/src/devices/cpu/pps4/pps4.cpp b/src/devices/cpu/pps4/pps4.cpp index a8f0a08e5cc..f71c563caaa 100644 --- a/src/devices/cpu/pps4/pps4.cpp +++ b/src/devices/cpu/pps4/pps4.cpp @@ -100,10 +100,10 @@ void pps4_device::W(uint8_t data) m_SAG = 0; } -offs_t pps4_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) +offs_t pps4_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) { extern CPU_DISASSEMBLE( pps4 ); - return CPU_DISASSEMBLE_NAME(pps4)(this, buffer, pc, oprom, opram, options); + return CPU_DISASSEMBLE_NAME(pps4)(this, stream, pc, oprom, opram, options); } /** diff --git a/src/devices/cpu/pps4/pps4.h b/src/devices/cpu/pps4/pps4.h index 224060efee1..c590ac85384 100644 --- a/src/devices/cpu/pps4/pps4.h +++ b/src/devices/cpu/pps4/pps4.h @@ -64,7 +64,7 @@ protected: // device_disasm_interface overrides virtual uint32_t disasm_min_opcode_bytes() const override { return 1; } 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; private: address_space_config m_program_config; diff --git a/src/devices/cpu/pps4/pps4dasm.cpp b/src/devices/cpu/pps4/pps4dasm.cpp index 3dad2e7d1fd..71bf93dcb44 100644 --- a/src/devices/cpu/pps4/pps4dasm.cpp +++ b/src/devices/cpu/pps4/pps4dasm.cpp @@ -367,7 +367,7 @@ static const uint16_t table[] = { /* ff */ t_TM | t_I6i | t_OVER }; -static offs_t internal_disasm_pps4(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options) +CPU_DISASSEMBLE(pps4) { uint32_t flags = 0; unsigned PC = pc; @@ -440,12 +440,3 @@ static offs_t internal_disasm_pps4(cpu_device *device, std::ostream &stream, off return (pc - PC) | flags | DASMFLAG_SUPPORTED; } - -CPU_DISASSEMBLE(pps4) -{ - std::ostringstream stream; - offs_t result = internal_disasm_pps4(device, stream, pc, oprom, opram, options); - std::string stream_str = stream.str(); - strcpy(buffer, stream_str.c_str()); - return result; -} |