mirror of
https://github.com/holub/mame
synced 2025-04-27 18:53:05 +03:00
Further cleanups to the TLCS900 disassemlber; fixed some paren spacing, converted a char[] buffer to std::string
This commit is contained in:
parent
06613b3dd1
commit
a05f144d1e
@ -1436,7 +1436,7 @@ static const char *const s_cond[16] =
|
|||||||
static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
|
||||||
{
|
{
|
||||||
const tlcs900inst *dasm;
|
const tlcs900inst *dasm;
|
||||||
char buf[32];
|
std::string buf;
|
||||||
uint8_t op, op1;
|
uint8_t op, op1;
|
||||||
uint32_t imm;
|
uint32_t imm;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
@ -1451,54 +1451,55 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case M_80:
|
case M_80:
|
||||||
sprintf( buf, "%s", s_reg32[op & 0x07] );
|
buf = string_format("%s", s_reg32[op & 0x07]);
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
dasm = &mnemonic_80[ op ];
|
dasm = &mnemonic_80[ op ];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case M_88:
|
case M_88:
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+0x%02x", s_reg32[op & 0x07], imm );
|
buf = string_format("%s+0x%02x", s_reg32[op & 0x07], imm);
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
dasm = &mnemonic_88[ op ];
|
dasm = &mnemonic_88[ op ];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case M_90:
|
case M_90:
|
||||||
sprintf( buf, "%s", s_reg32[op & 0x07] );
|
buf = string_format("%s", s_reg32[op & 0x07]);
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
dasm = &mnemonic_90[ op ];
|
dasm = &mnemonic_90[ op ];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case M_98:
|
case M_98:
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+0x%02x", s_reg32[op & 0x07], imm );
|
buf = string_format("%s+0x%02x", s_reg32[op & 0x07], imm);
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
dasm = &mnemonic_98[ op ];
|
dasm = &mnemonic_98[ op ];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case M_A0:
|
case M_A0:
|
||||||
sprintf( buf, "%s", s_reg32[op & 0x07] );
|
buf = string_format("%s", s_reg32[op & 0x07]);
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
dasm = &mnemonic_a0[ op ];
|
dasm = &mnemonic_a0[ op ];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case M_A8:
|
case M_A8:
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+0x%02x", s_reg32[op & 0x07], imm );
|
buf = string_format("%s+0x%02x", s_reg32[op & 0x07], imm);
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
dasm = &mnemonic_a0[ op ];
|
dasm = &mnemonic_a0[ op ];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case M_B0:
|
case M_B0:
|
||||||
sprintf( buf, "%s", s_reg32[op & 0x07] );
|
buf = string_format("%s", s_reg32[op & 0x07]);
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
dasm = &mnemonic_b0[ op ];
|
dasm = &mnemonic_b0[ op ];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case M_B8:
|
case M_B8:
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+0x%02x", s_reg32[op & 0x07], imm );
|
buf = string_format("%s+0x%02x", s_reg32[op & 0x07], imm);
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
dasm = &mnemonic_b8[ op ];
|
dasm = &mnemonic_b8[ op ];
|
||||||
break;
|
break;
|
||||||
@ -1508,20 +1509,20 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
{
|
{
|
||||||
case 0x00: /* 0xC0 */
|
case 0x00: /* 0xC0 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "0x%02x", imm );
|
buf = string_format("0x%02x", imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x01: /* 0xC1 */
|
case 0x01: /* 0xC1 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
sprintf( buf, "0x%04x", imm );
|
buf = string_format("0x%04x", imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x02: /* 0xC2 */
|
case 0x02: /* 0xC2 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
imm = imm | ( oprom[ pos++ ] << 16);
|
imm = imm | ( oprom[ pos++ ] << 16);
|
||||||
sprintf( buf, "0x%06x", imm );
|
buf = string_format("0x%06x", imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x03: /* 0xC3 */
|
case 0x03: /* 0xC3 */
|
||||||
@ -1529,18 +1530,18 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
switch( imm & 0x03 )
|
switch( imm & 0x03 )
|
||||||
{
|
{
|
||||||
case 0x00:
|
case 0x00:
|
||||||
sprintf( buf, "%s", s_allreg32[imm] );
|
buf = string_format("%s", s_allreg32[imm]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x01:
|
case 0x01:
|
||||||
op = imm;
|
op = imm;
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
sprintf( buf, "%s+0x%04x", s_allreg32[op], imm );
|
buf = string_format("%s+0x%04x", s_allreg32[op], imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x02:
|
case 0x02:
|
||||||
sprintf( buf, "unknown" );
|
buf = string_format("unknown");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x03:
|
case 0x03:
|
||||||
@ -1549,19 +1550,19 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
case 0x03:
|
case 0x03:
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
op1 = oprom[ pos++ ];
|
op1 = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+%s", s_allreg32[op], s_allreg8[op1] );
|
buf = string_format("%s+%s", s_allreg32[op], s_allreg8[op1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x07:
|
case 0x07:
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
op1 = oprom[ pos++ ];
|
op1 = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+%s", s_allreg32[op], s_allreg16[op1] );
|
buf = string_format("%s+%s", s_allreg32[op], s_allreg16[op1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x13:
|
case 0x13:
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
sprintf( buf, "0x%06x", pc + pos + (int16_t)imm );
|
buf = string_format("0x%06x", pc + pos + (int16_t)imm);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1570,12 +1571,12 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
|
|
||||||
case 0x04: /* 0xC4 */
|
case 0x04: /* 0xC4 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "-%s", s_allreg32[imm] );
|
buf = string_format("-%s", s_allreg32[imm]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x05: /* 0xC5 */
|
case 0x05: /* 0xC5 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+", s_allreg32[imm] );
|
buf = string_format("%s+", s_allreg32[imm]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
@ -1585,12 +1586,12 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
case oC8:
|
case oC8:
|
||||||
if ( op & 0x08 )
|
if ( op & 0x08 )
|
||||||
{
|
{
|
||||||
sprintf( buf, "%s", s_reg8[ op & 0x07 ] );
|
buf = string_format("%s", s_reg8[ op & 0x07 ]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s", s_allreg8[imm] );
|
buf = string_format("%s", s_allreg8[imm]);
|
||||||
}
|
}
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
dasm = &mnemonic_c8[ op ];
|
dasm = &mnemonic_c8[ op ];
|
||||||
@ -1601,20 +1602,20 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
{
|
{
|
||||||
case 0x00: /* 0xD0 */
|
case 0x00: /* 0xD0 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "0x%02x", imm );
|
buf = string_format("0x%02x", imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x01: /* 0xD1 */
|
case 0x01: /* 0xD1 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
sprintf( buf, "0x%04x", imm );
|
buf = string_format("0x%04x", imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x02: /* 0xD2 */
|
case 0x02: /* 0xD2 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
imm = imm | ( oprom[ pos++ ] << 16);
|
imm = imm | ( oprom[ pos++ ] << 16);
|
||||||
sprintf( buf, "0x%06x", imm );
|
buf = string_format("0x%06x", imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x03: /* 0xD3 */
|
case 0x03: /* 0xD3 */
|
||||||
@ -1622,18 +1623,18 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
switch( imm & 0x03 )
|
switch( imm & 0x03 )
|
||||||
{
|
{
|
||||||
case 0x00:
|
case 0x00:
|
||||||
sprintf( buf, "%s", s_allreg32[imm] );
|
buf = string_format("%s", s_allreg32[imm]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x01:
|
case 0x01:
|
||||||
op = imm;
|
op = imm;
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
sprintf( buf, "%s+0x%04x", s_allreg32[op], imm );
|
buf = string_format("%s+0x%04x", s_allreg32[op], imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x02:
|
case 0x02:
|
||||||
sprintf( buf, "unknown" );
|
buf = string_format("unknown");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x03:
|
case 0x03:
|
||||||
@ -1642,19 +1643,19 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
case 0x03:
|
case 0x03:
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
op1 = oprom[ pos++ ];
|
op1 = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+%s", s_allreg32[op], s_allreg8[op1] );
|
buf = string_format("%s+%s", s_allreg32[op], s_allreg8[op1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x07:
|
case 0x07:
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
op1 = oprom[ pos++ ];
|
op1 = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+%s", s_allreg32[op], s_allreg16[op1] );
|
buf = string_format("%s+%s", s_allreg32[op], s_allreg16[op1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x13:
|
case 0x13:
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
sprintf( buf, "0x%06x", pc + pos + (int16_t)imm );
|
buf = string_format("0x%06x", pc + pos + (int16_t)imm);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1663,12 +1664,12 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
|
|
||||||
case 0x04: /* 0xD4 */
|
case 0x04: /* 0xD4 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "-%s", s_allreg32[imm] );
|
buf = string_format("-%s", s_allreg32[imm]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x05: /* 0xD5 */
|
case 0x05: /* 0xD5 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+", s_allreg32[imm] );
|
buf = string_format("%s+", s_allreg32[imm]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
@ -1678,12 +1679,12 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
case oD8:
|
case oD8:
|
||||||
if ( op & 0x08 )
|
if ( op & 0x08 )
|
||||||
{
|
{
|
||||||
sprintf( buf, "%s", s_reg16[ op & 0x07 ] );
|
buf = string_format("%s", s_reg16[ op & 0x07 ]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s", s_allreg16[imm] );
|
buf = string_format("%s", s_allreg16[imm]);
|
||||||
}
|
}
|
||||||
|
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
@ -1695,20 +1696,20 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
{
|
{
|
||||||
case 0x00: /* 0xE0 */
|
case 0x00: /* 0xE0 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "0x%02x", imm );
|
buf = string_format("0x%02x", imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x01: /* 0xE1 */
|
case 0x01: /* 0xE1 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
sprintf( buf, "0x%04x", imm );
|
buf = string_format("0x%04x", imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x02: /* 0xE2 */
|
case 0x02: /* 0xE2 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
imm = imm | ( oprom[ pos++ ] << 16);
|
imm = imm | ( oprom[ pos++ ] << 16);
|
||||||
sprintf( buf, "0x%06x", imm );
|
buf = string_format("0x%06x", imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x03: /* 0xE3 */
|
case 0x03: /* 0xE3 */
|
||||||
@ -1716,18 +1717,18 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
switch( imm & 0x03 )
|
switch( imm & 0x03 )
|
||||||
{
|
{
|
||||||
case 0x00:
|
case 0x00:
|
||||||
sprintf( buf, "%s", s_allreg32[imm] );
|
buf = string_format("%s", s_allreg32[imm]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x01:
|
case 0x01:
|
||||||
op = imm;
|
op = imm;
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
sprintf( buf, "%s+0x%04x", s_allreg32[op], imm );
|
buf = string_format("%s+0x%04x", s_allreg32[op], imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x02:
|
case 0x02:
|
||||||
sprintf( buf, "unknown" );
|
buf = string_format("unknown");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x03:
|
case 0x03:
|
||||||
@ -1736,19 +1737,19 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
case 0x03:
|
case 0x03:
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
op1 = oprom[ pos++ ];
|
op1 = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+%s", s_allreg32[op], s_allreg8[op1] );
|
buf = string_format("%s+%s", s_allreg32[op], s_allreg8[op1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x07:
|
case 0x07:
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
op1 = oprom[ pos++ ];
|
op1 = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+%s", s_allreg32[op], s_allreg16[op1] );
|
buf = string_format("%s+%s", s_allreg32[op], s_allreg16[op1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x13:
|
case 0x13:
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
sprintf( buf, "0x%06x", pc + pos + (int16_t)imm );
|
buf = string_format("0x%06x", pc + pos + (int16_t)imm);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1757,12 +1758,12 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
|
|
||||||
case 0x04: /* 0xE4 */
|
case 0x04: /* 0xE4 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "-%s", s_allreg32[imm] );
|
buf = string_format("-%s", s_allreg32[imm]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x05: /* 0xE5 */
|
case 0x05: /* 0xE5 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+", s_allreg32[imm] );
|
buf = string_format("%s+", s_allreg32[imm]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
@ -1772,12 +1773,12 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
case M_E8:
|
case M_E8:
|
||||||
if ( op & 0x08 )
|
if ( op & 0x08 )
|
||||||
{
|
{
|
||||||
sprintf( buf, "%s", s_reg32[ op & 0x07 ] );
|
buf = string_format("%s", s_reg32[ op & 0x07 ]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s", s_allreg32[imm] );
|
buf = string_format("%s", s_allreg32[imm]);
|
||||||
}
|
}
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
dasm = &mnemonic_e8[ op ];
|
dasm = &mnemonic_e8[ op ];
|
||||||
@ -1788,20 +1789,20 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
{
|
{
|
||||||
case 0x00: /* 0xF0 */
|
case 0x00: /* 0xF0 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "0x%02x", imm );
|
buf = string_format("0x%02x", imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x01: /* 0xF1 */
|
case 0x01: /* 0xF1 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
sprintf( buf, "0x%04x", imm );
|
buf = string_format("0x%04x", imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x02: /* 0xF2 */
|
case 0x02: /* 0xF2 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
imm = imm | ( oprom[ pos++ ] << 16);
|
imm = imm | ( oprom[ pos++ ] << 16);
|
||||||
sprintf( buf, "0x%06x", imm );
|
buf = string_format("0x%06x", imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x03: /* 0xF3 */
|
case 0x03: /* 0xF3 */
|
||||||
@ -1809,18 +1810,18 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
switch( imm & 0x03 )
|
switch( imm & 0x03 )
|
||||||
{
|
{
|
||||||
case 0x00:
|
case 0x00:
|
||||||
sprintf( buf, "%s", s_allreg32[imm] );
|
buf = string_format("%s", s_allreg32[imm]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x01:
|
case 0x01:
|
||||||
op = imm;
|
op = imm;
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
sprintf( buf, "%s+0x%04x", s_allreg32[op], imm );
|
buf = string_format("%s+0x%04x", s_allreg32[op], imm);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x02:
|
case 0x02:
|
||||||
sprintf( buf, "unknown" );
|
buf = string_format("unknown");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x03:
|
case 0x03:
|
||||||
@ -1829,19 +1830,19 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
case 0x03:
|
case 0x03:
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
op1 = oprom[ pos++ ];
|
op1 = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+%s", s_allreg32[op], s_allreg8[op1] );
|
buf = string_format("%s+%s", s_allreg32[op], s_allreg8[op1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x07:
|
case 0x07:
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
op1 = oprom[ pos++ ];
|
op1 = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+%s", s_allreg32[op], s_allreg16[op1] );
|
buf = string_format("%s+%s", s_allreg32[op], s_allreg16[op1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x13:
|
case 0x13:
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
imm = imm | ( oprom[ pos++ ] << 8);
|
imm = imm | ( oprom[ pos++ ] << 8);
|
||||||
sprintf( buf, "0x%06x", pc + pos + (int16_t)imm );
|
buf = string_format("0x%06x", pc + pos + (int16_t)imm);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1850,12 +1851,12 @@ static offs_t internal_disasm_tlcs900(cpu_device *device, std::ostream &stream,
|
|||||||
|
|
||||||
case 0x04: /* 0xF4 */
|
case 0x04: /* 0xF4 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "-%s", s_allreg32[imm] );
|
buf = string_format("-%s", s_allreg32[imm]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x05: /* 0xF5 */
|
case 0x05: /* 0xF5 */
|
||||||
imm = oprom[ pos++ ];
|
imm = oprom[ pos++ ];
|
||||||
sprintf( buf, "%s+", s_allreg32[imm] );
|
buf = string_format("%s+", s_allreg32[imm]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
op = oprom[ pos++ ];
|
op = oprom[ pos++ ];
|
||||||
|
Loading…
Reference in New Issue
Block a user