mirror of
https://github.com/holub/mame
synced 2025-07-06 02:18:09 +03:00
-i386: xlat implementation fix [Alegend45]
This commit is contained in:
parent
f54800c1f3
commit
a49a951ae9
@ -3674,9 +3674,23 @@ static void I386OP(xlat16)(i386_state *cpustate) // Opcode 0xd7
|
|||||||
{
|
{
|
||||||
UINT32 ea;
|
UINT32 ea;
|
||||||
if( cpustate->segment_prefix ) {
|
if( cpustate->segment_prefix ) {
|
||||||
ea = i386_translate(cpustate, cpustate->segment_override, REG16(BX) + REG8(AL), 0 );
|
if(cpustate->address_size)
|
||||||
|
{
|
||||||
|
ea = i386_translate(cpustate, cpustate->segment_override, REG32(BX) + REG8(AL), 0 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ea = i386_translate(cpustate, cpustate->segment_override, REG16(EBX) + REG8(AL), 0 );
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ea = i386_translate(cpustate, DS, REG16(BX) + REG8(AL), 0 );
|
if(cpustate->address_size)
|
||||||
|
{
|
||||||
|
ea = i386_translate(cpustate, DS, REG32(BX) + REG8(AL), 0 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ea = i386_translate(cpustate, DS, REG16(EBX) + REG8(AL), 0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
REG8(AL) = READ8(cpustate,ea);
|
REG8(AL) = READ8(cpustate,ea);
|
||||||
CYCLES(cpustate,CYCLES_XLAT);
|
CYCLES(cpustate,CYCLES_XLAT);
|
||||||
|
@ -3472,9 +3472,23 @@ static void I386OP(xlat32)(i386_state *cpustate) // Opcode 0xd7
|
|||||||
{
|
{
|
||||||
UINT32 ea;
|
UINT32 ea;
|
||||||
if( cpustate->segment_prefix ) {
|
if( cpustate->segment_prefix ) {
|
||||||
ea = i386_translate(cpustate, cpustate->segment_override, REG32(EBX) + REG8(AL), 0 );
|
if(cpustate->address_size)
|
||||||
|
{
|
||||||
|
ea = i386_translate(cpustate, cpustate->segment_override, REG16(BX) + REG8(AL), 0 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ea = i386_translate(cpustate, cpustate->segment_override, REG32(EBX) + REG8(AL), 0 );
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ea = i386_translate(cpustate, DS, REG32(EBX) + REG8(AL), 0 );
|
if(cpustate->address_size)
|
||||||
|
{
|
||||||
|
ea = i386_translate(cpustate, DS, REG16(BX) + REG8(AL), 0 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ea = i386_translate(cpustate, DS, REG32(EBX) + REG8(AL), 0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
REG8(AL) = READ8(cpustate,ea);
|
REG8(AL) = READ8(cpustate,ea);
|
||||||
CYCLES(cpustate,CYCLES_XLAT);
|
CYCLES(cpustate,CYCLES_XLAT);
|
||||||
|
Loading…
Reference in New Issue
Block a user