Ported the most relevant PCem commits to 86Box.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* CPU type handler.
|
||||
*
|
||||
* Version: @(#)cpu.c 1.0.13 2018/03/02
|
||||
* Version: @(#)cpu.c 1.0.14 2018/03/11
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* leilei,
|
||||
@@ -113,7 +113,7 @@ int cpuspeed;
|
||||
uint64_t cpu_CR4_mask;
|
||||
|
||||
int cpu_cycles_read, cpu_cycles_read_l, cpu_cycles_write, cpu_cycles_write_l;
|
||||
int cpu_prefetch_cycles, cpu_prefetch_width;
|
||||
int cpu_prefetch_cycles, cpu_prefetch_width, cpu_mem_prefetch_cycles, cpu_rom_prefetch_cycles;
|
||||
int cpu_waitstates;
|
||||
int cpu_cache_int_enabled, cpu_cache_ext_enabled;
|
||||
int cpu_pci_speed;
|
||||
@@ -246,6 +246,8 @@ void cpu_set()
|
||||
|
||||
isa_cycles = cpu_s->atclk_div;
|
||||
|
||||
cpu_rom_prefetch_cycles = cpu_s->rspeed / 1000000;
|
||||
|
||||
if (cpu_s->pci_speed)
|
||||
{
|
||||
pci_nonburst_time = 4*cpu_s->rspeed / cpu_s->pci_speed;
|
||||
@@ -2217,7 +2219,10 @@ void cpu_update_waitstates()
|
||||
{
|
||||
cpu_s = &machines[machine].cpu[cpu_manufacturer].cpus[cpu_effective];
|
||||
|
||||
cpu_prefetch_width = cpu_16bitbus ? 2 : 4;
|
||||
if (is486)
|
||||
cpu_prefetch_width = 16;
|
||||
else
|
||||
cpu_prefetch_width = cpu_16bitbus ? 2 : 4;
|
||||
|
||||
if (cpu_cache_int_enabled)
|
||||
{
|
||||
@@ -2251,4 +2256,7 @@ void cpu_update_waitstates()
|
||||
cpu_cycles_write = cpu_s->mem_write_cycles;
|
||||
cpu_cycles_write_l = (cpu_16bitbus ? 2 : 1) * cpu_s->mem_write_cycles;
|
||||
}
|
||||
if (is486)
|
||||
cpu_prefetch_cycles *= 4;
|
||||
cpu_mem_prefetch_cycles = cpu_prefetch_cycles;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* CPU type handler.
|
||||
*
|
||||
* Version: @(#)cpu.h 1.0.9 2018/03/02
|
||||
* Version: @(#)cpu.h 1.0.10 2018/03/11
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* leilei,
|
||||
@@ -387,7 +387,7 @@ extern x86seg _oldds;
|
||||
#define ISA_CYCLES(x) ((x * isa_cycles) >> ISA_CYCLES_SHIFT)
|
||||
|
||||
extern int cpu_cycles_read, cpu_cycles_read_l, cpu_cycles_write, cpu_cycles_write_l;
|
||||
extern int cpu_prefetch_cycles, cpu_prefetch_width;
|
||||
extern int cpu_prefetch_cycles, cpu_prefetch_width, cpu_mem_prefetch_cycles, cpu_rom_prefetch_cycles;
|
||||
extern int cpu_waitstates;
|
||||
extern int cpu_cache_int_enabled, cpu_cache_ext_enabled;
|
||||
extern int cpu_pci_speed;
|
||||
|
||||
Reference in New Issue
Block a user