Merge pull request #1673 from npwoods/dasmstream_hyperstone

Changed the hyperstone disassembler to use 'std::ostream &' internally
This commit is contained in:
Vas Crabb 2016-11-12 18:19:58 +11:00 committed by GitHub
commit 2426d31f98
3 changed files with 218 additions and 206 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1906,8 +1906,11 @@ uint32_t hyperstone_device::disasm_max_opcode_bytes() const
offs_t hyperstone_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
extern CPU_DISASSEMBLE( hyperstone );
return dasm_hyperstone( buffer, pc, oprom, GET_H, GET_FP );
std::ostringstream stream;
offs_t result = dasm_hyperstone(stream, pc, oprom, GET_H, GET_FP);
std::string stream_str = stream.str();
strcpy(buffer, stream_str.c_str());
return result;
}
/* Opcodes */

View File

@ -174,7 +174,7 @@ enum
E132XS_L60, E132XS_L61, E132XS_L62, E132XS_L63
};
extern unsigned dasm_hyperstone(char *buffer, unsigned pc, const uint8_t *oprom, unsigned h_flag, int private_fp);
extern unsigned dasm_hyperstone(std::ostream &stream, unsigned pc, const uint8_t *oprom, unsigned h_flag, int private_fp);
/* Memory access */
/* read byte */