mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
Changed the Alpha 8x01 disassembler to use std::ostream internally
This commit is contained in:
parent
347b8cd925
commit
fe7f15971e
@ -349,7 +349,7 @@ static void InitDasm8201(void)
|
|||||||
OpInizialized = 1;
|
OpInizialized = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPU_DISASSEMBLE( alpha8201 )
|
static offs_t internal_disasm_alpha8201(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
||||||
{
|
{
|
||||||
offs_t dasmflags = 0;
|
offs_t dasmflags = 0;
|
||||||
int i;
|
int i;
|
||||||
@ -376,7 +376,7 @@ CPU_DISASSEMBLE( alpha8201 )
|
|||||||
|
|
||||||
if (op == -1)
|
if (op == -1)
|
||||||
{
|
{
|
||||||
sprintf(buffer,"db %2.2x",code);
|
util::stream_format(stream, "db %2.2x",code);
|
||||||
return cnt;
|
return cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -391,11 +391,11 @@ CPU_DISASSEMBLE( alpha8201 )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Op[op].type & 0x02)
|
if (Op[op].type & 0x02)
|
||||||
sprintf(buffer, Op[op].fmt,disp,disp);
|
util::stream_format(stream, Op[op].fmt,disp,disp);
|
||||||
else if (Op[op].type & 0x01)
|
else if (Op[op].type & 0x01)
|
||||||
sprintf(buffer, Op[op].fmt,disp);
|
util::stream_format(stream, Op[op].fmt,disp);
|
||||||
else
|
else
|
||||||
sprintf(buffer, "%s",Op[op].fmt);
|
util::stream_format(stream, "%s",Op[op].fmt);
|
||||||
|
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
@ -413,3 +413,12 @@ CPU_DISASSEMBLE( alpha8201 )
|
|||||||
|
|
||||||
return cnt | dasmflags | DASMFLAG_SUPPORTED;
|
return cnt | dasmflags | DASMFLAG_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CPU_DISASSEMBLE(alpha8201)
|
||||||
|
{
|
||||||
|
std::ostringstream stream;
|
||||||
|
offs_t result = internal_disasm_alpha8201(device, stream, pc, oprom, opram, options);
|
||||||
|
std::string stream_str = stream.str();
|
||||||
|
strcpy(buffer, stream_str.c_str());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user