IBM PS/2 Model 30-286 now uses XTIDE version 1.1.5;
The 287 FPU is now correctly detected as such; Added two instructions that were incorrectly missing from the 286, fixes Standard Mode Windows.
This commit is contained in:
@@ -611,6 +611,10 @@ int loadbios()
|
|||||||
fread(rom, 0x20000, 1, f);
|
fread(rom, 0x20000, 1, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
biosmask = 0x1ffff;
|
biosmask = 0x1ffff;
|
||||||
|
if (enable_xtide)
|
||||||
|
{
|
||||||
|
mem_load_atide115_bios();
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case ROM_DESKPRO_386:
|
case ROM_DESKPRO_386:
|
||||||
@@ -729,7 +733,7 @@ int loadbios()
|
|||||||
biosmask = 0x1ffff;
|
biosmask = 0x1ffff;
|
||||||
if (enable_xtide)
|
if (enable_xtide)
|
||||||
{
|
{
|
||||||
mem_load_atide_bios();
|
mem_load_atide115_bios();
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
static int opESCAPE_d8_a16(uint32_t fetchdat)
|
static int opESCAPE_d8_a16(uint32_t fetchdat)
|
||||||
{
|
{
|
||||||
|
pclog("D8 %02X\n", fetchdat & 0xff);
|
||||||
return x86_opcodes_d8_a16[(fetchdat >> 3) & 0x1f](fetchdat);
|
return x86_opcodes_d8_a16[(fetchdat >> 3) & 0x1f](fetchdat);
|
||||||
}
|
}
|
||||||
static int opESCAPE_d8_a32(uint32_t fetchdat)
|
static int opESCAPE_d8_a32(uint32_t fetchdat)
|
||||||
@@ -12,6 +13,7 @@ static int opESCAPE_d8_a32(uint32_t fetchdat)
|
|||||||
|
|
||||||
static int opESCAPE_d9_a16(uint32_t fetchdat)
|
static int opESCAPE_d9_a16(uint32_t fetchdat)
|
||||||
{
|
{
|
||||||
|
pclog("D9 %02X\n", fetchdat & 0xff);
|
||||||
return x86_opcodes_d9_a16[fetchdat & 0xff](fetchdat);
|
return x86_opcodes_d9_a16[fetchdat & 0xff](fetchdat);
|
||||||
}
|
}
|
||||||
static int opESCAPE_d9_a32(uint32_t fetchdat)
|
static int opESCAPE_d9_a32(uint32_t fetchdat)
|
||||||
@@ -21,6 +23,7 @@ static int opESCAPE_d9_a32(uint32_t fetchdat)
|
|||||||
|
|
||||||
static int opESCAPE_da_a16(uint32_t fetchdat)
|
static int opESCAPE_da_a16(uint32_t fetchdat)
|
||||||
{
|
{
|
||||||
|
pclog("DA %02X\n", fetchdat & 0xff);
|
||||||
return x86_opcodes_da_a16[fetchdat & 0xff](fetchdat);
|
return x86_opcodes_da_a16[fetchdat & 0xff](fetchdat);
|
||||||
}
|
}
|
||||||
static int opESCAPE_da_a32(uint32_t fetchdat)
|
static int opESCAPE_da_a32(uint32_t fetchdat)
|
||||||
@@ -30,6 +33,7 @@ static int opESCAPE_da_a32(uint32_t fetchdat)
|
|||||||
|
|
||||||
static int opESCAPE_db_a16(uint32_t fetchdat)
|
static int opESCAPE_db_a16(uint32_t fetchdat)
|
||||||
{
|
{
|
||||||
|
pclog("DB %02X\n", fetchdat & 0xff);
|
||||||
return x86_opcodes_db_a16[fetchdat & 0xff](fetchdat);
|
return x86_opcodes_db_a16[fetchdat & 0xff](fetchdat);
|
||||||
}
|
}
|
||||||
static int opESCAPE_db_a32(uint32_t fetchdat)
|
static int opESCAPE_db_a32(uint32_t fetchdat)
|
||||||
@@ -39,6 +43,7 @@ static int opESCAPE_db_a32(uint32_t fetchdat)
|
|||||||
|
|
||||||
static int opESCAPE_dc_a16(uint32_t fetchdat)
|
static int opESCAPE_dc_a16(uint32_t fetchdat)
|
||||||
{
|
{
|
||||||
|
pclog("DC %02X\n", fetchdat & 0xff);
|
||||||
return x86_opcodes_dc_a16[(fetchdat >> 3) & 0x1f](fetchdat);
|
return x86_opcodes_dc_a16[(fetchdat >> 3) & 0x1f](fetchdat);
|
||||||
}
|
}
|
||||||
static int opESCAPE_dc_a32(uint32_t fetchdat)
|
static int opESCAPE_dc_a32(uint32_t fetchdat)
|
||||||
@@ -48,6 +53,7 @@ static int opESCAPE_dc_a32(uint32_t fetchdat)
|
|||||||
|
|
||||||
static int opESCAPE_dd_a16(uint32_t fetchdat)
|
static int opESCAPE_dd_a16(uint32_t fetchdat)
|
||||||
{
|
{
|
||||||
|
pclog("DD %02X\n", fetchdat & 0xff);
|
||||||
return x86_opcodes_dd_a16[fetchdat & 0xff](fetchdat);
|
return x86_opcodes_dd_a16[fetchdat & 0xff](fetchdat);
|
||||||
}
|
}
|
||||||
static int opESCAPE_dd_a32(uint32_t fetchdat)
|
static int opESCAPE_dd_a32(uint32_t fetchdat)
|
||||||
@@ -57,6 +63,7 @@ static int opESCAPE_dd_a32(uint32_t fetchdat)
|
|||||||
|
|
||||||
static int opESCAPE_de_a16(uint32_t fetchdat)
|
static int opESCAPE_de_a16(uint32_t fetchdat)
|
||||||
{
|
{
|
||||||
|
pclog("DE %02X\n", fetchdat & 0xff);
|
||||||
return x86_opcodes_de_a16[fetchdat & 0xff](fetchdat);
|
return x86_opcodes_de_a16[fetchdat & 0xff](fetchdat);
|
||||||
}
|
}
|
||||||
static int opESCAPE_de_a32(uint32_t fetchdat)
|
static int opESCAPE_de_a32(uint32_t fetchdat)
|
||||||
@@ -66,6 +73,7 @@ static int opESCAPE_de_a32(uint32_t fetchdat)
|
|||||||
|
|
||||||
static int opESCAPE_df_a16(uint32_t fetchdat)
|
static int opESCAPE_df_a16(uint32_t fetchdat)
|
||||||
{
|
{
|
||||||
|
pclog("DF %02X\n", fetchdat & 0xff);
|
||||||
return x86_opcodes_df_a16[fetchdat & 0xff](fetchdat);
|
return x86_opcodes_df_a16[fetchdat & 0xff](fetchdat);
|
||||||
}
|
}
|
||||||
static int opESCAPE_df_a32(uint32_t fetchdat)
|
static int opESCAPE_df_a32(uint32_t fetchdat)
|
||||||
|
|||||||
@@ -210,6 +210,28 @@ static inline uint16_t x87_compare(double a, double b)
|
|||||||
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined WIN32 || defined _WIN32 || defined _WIN32
|
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined WIN32 || defined _WIN32 || defined _WIN32
|
||||||
uint32_t out;
|
uint32_t out;
|
||||||
|
|
||||||
|
if (!is386)
|
||||||
|
{
|
||||||
|
if (((a == INFINITY) || (a == -INFINITY)) && ((b == INFINITY) || (b == -INFINITY)))
|
||||||
|
{
|
||||||
|
// pclog("Comparing infinity\n");
|
||||||
|
|
||||||
|
asm volatile ("" : : : "memory");
|
||||||
|
|
||||||
|
asm(
|
||||||
|
"fldl %2\n"
|
||||||
|
"fldl %1\n"
|
||||||
|
"fclex\n"
|
||||||
|
"fcompp\n"
|
||||||
|
"fnstsw %0\n"
|
||||||
|
: "=m" (out)
|
||||||
|
: "m" (a), "m" (a)
|
||||||
|
);
|
||||||
|
|
||||||
|
return out & (C0|C2|C3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Memory barrier, to force GCC to write to the input parameters
|
/* Memory barrier, to force GCC to write to the input parameters
|
||||||
* before the compare rather than after */
|
* before the compare rather than after */
|
||||||
asm volatile ("" : : : "memory");
|
asm volatile ("" : : : "memory");
|
||||||
@@ -230,10 +252,26 @@ static inline uint16_t x87_compare(double a, double b)
|
|||||||
* situations, eg comparison of infinity (Unreal) */
|
* situations, eg comparison of infinity (Unreal) */
|
||||||
uint32_t out = 0;
|
uint32_t out = 0;
|
||||||
|
|
||||||
if (a == b)
|
if (is386)
|
||||||
out |= C3;
|
{
|
||||||
else if (a < b)
|
if ((a == INFINITY) || (a == -INFINITY)) && ((b == INFINITY) || (b == -INFINITY))
|
||||||
out |= C0;
|
{
|
||||||
|
out |= C3;
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (a == b)
|
||||||
|
out |= C3;
|
||||||
|
else if (a < b)
|
||||||
|
out |= C0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (a == b)
|
||||||
|
out |= C3;
|
||||||
|
else if (a < b)
|
||||||
|
out |= C0;
|
||||||
|
}
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
#endif
|
#endif
|
||||||
@@ -755,7 +793,7 @@ OpFn OP_TABLE(fpu_287_db_a16)[256] =
|
|||||||
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||||
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||||
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||||
opFNOP, opFNOP, opFCLEX, opFINIT, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
opFNOP, opFNOP, opFCLEX, opFINIT, opFNOP, opFNOP, ILLEGAL, ILLEGAL,
|
||||||
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||||
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||||
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||||
@@ -793,7 +831,7 @@ OpFn OP_TABLE(fpu_287_db_a32)[256] =
|
|||||||
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||||
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||||
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||||
opFNOP, opFNOP, opFCLEX, opFINIT, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
opFNOP, opFNOP, opFCLEX, opFINIT, opFNOP, opFNOP, ILLEGAL, ILLEGAL,
|
||||||
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||||
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||||
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ static int opFCOMPP(uint32_t fetchdat)
|
|||||||
cpu_state.pc++;
|
cpu_state.pc++;
|
||||||
if (fplog) pclog("FCOMPP\n");
|
if (fplog) pclog("FCOMPP\n");
|
||||||
cpu_state.npxs &= ~(C0|C2|C3);
|
cpu_state.npxs &= ~(C0|C2|C3);
|
||||||
if (*(uint64_t *)&ST(0) == ((uint64_t)1 << 63) && *(uint64_t *)&ST(1) == 0)
|
if ((*(uint64_t *)&ST(0) == ((uint64_t)1 << 63) && *(uint64_t *)&ST(1) == 0) && is386)
|
||||||
cpu_state.npxs |= C0; /*Nasty hack to fix 80387 detection*/
|
cpu_state.npxs |= C0; /*Nasty hack to fix 80387 detection*/
|
||||||
else
|
else
|
||||||
cpu_state.npxs |= x87_compare(ST(0), ST(1));
|
cpu_state.npxs |= x87_compare(ST(0), ST(1));
|
||||||
|
|||||||
Reference in New Issue
Block a user