Rewrote the disc sector poller again for simplified code and more accuracy;

Floppy formats are now accurately timed and also more accurately implemented;
Applied all mainline PCem commits.
This commit is contained in:
OBattler
2016-08-20 03:40:12 +02:00
parent 24a6ab13fb
commit a924f37f43
51 changed files with 2471 additions and 1302 deletions

View File

@@ -1,12 +1,9 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
static int opCMPXCHG_b_a16(uint32_t fetchdat)
{
uint8_t temp, temp2 = AL;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 1;
}
@@ -24,7 +21,7 @@ static int opCMPXCHG_b_a32(uint32_t fetchdat)
uint8_t temp, temp2 = AL;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 1;
}
@@ -43,7 +40,7 @@ static int opCMPXCHG_w_a16(uint32_t fetchdat)
uint16_t temp, temp2 = AX;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 1;
}
@@ -61,7 +58,7 @@ static int opCMPXCHG_w_a32(uint32_t fetchdat)
uint16_t temp, temp2 = AX;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 1;
}
@@ -80,7 +77,7 @@ static int opCMPXCHG_l_a16(uint32_t fetchdat)
uint32_t temp, temp2 = EAX;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 1;
}
@@ -98,7 +95,7 @@ static int opCMPXCHG_l_a32(uint32_t fetchdat)
uint32_t temp, temp2 = EAX;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 1;
}
@@ -117,17 +114,17 @@ static int opCMPXCHG8B_a16(uint32_t fetchdat)
uint32_t temp, temp_hi, temp2 = EAX, temp2_hi = EDX;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 0;
}
fetch_ea_16(fetchdat);
temp = geteal();
temp_hi = readmeml(easeg, eaaddr + 4); if (abrt) return 0;
temp_hi = readmeml(easeg, cpu_state.eaaddr + 4); if (abrt) return 0;
if (EAX == temp && EDX == temp_hi)
{
seteal(EBX);
writememl(easeg, eaaddr+4, ECX);
writememl(easeg, cpu_state.eaaddr+4, ECX);
}
else
{
@@ -148,17 +145,17 @@ static int opCMPXCHG8B_a32(uint32_t fetchdat)
uint32_t temp, temp_hi, temp2 = EAX, temp2_hi = EDX;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 0;
}
fetch_ea_32(fetchdat);
temp = geteal();
temp_hi = readmeml(easeg, eaaddr + 4); if (abrt) return 0;
temp_hi = readmeml(easeg, cpu_state.eaaddr + 4); if (abrt) return 0;
if (EAX == temp && EDX == temp_hi)
{
seteal(EBX);
writememl(easeg, eaaddr+4, ECX);
writememl(easeg, cpu_state.eaaddr+4, ECX);
}
else
{
@@ -180,7 +177,7 @@ static int opXADD_b_a16(uint32_t fetchdat)
uint8_t temp;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 1;
}
@@ -197,7 +194,7 @@ static int opXADD_b_a32(uint32_t fetchdat)
uint8_t temp;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 1;
}
@@ -215,7 +212,7 @@ static int opXADD_w_a16(uint32_t fetchdat)
uint16_t temp;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 1;
}
@@ -232,7 +229,7 @@ static int opXADD_w_a32(uint32_t fetchdat)
uint16_t temp;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 1;
}
@@ -250,7 +247,7 @@ static int opXADD_l_a16(uint32_t fetchdat)
uint32_t temp;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 1;
}
@@ -267,7 +264,7 @@ static int opXADD_l_a32(uint32_t fetchdat)
uint32_t temp;
if (!is486)
{
cpu_state.pc = oldpc;
cpu_state.pc = cpu_state.oldpc;
x86illegal();
return 1;
}