Reimplement S3 ViRGE reset and move PCI TRC CPU reset to outside the recompiled block, fixes #2903.

This commit is contained in:
OBattler
2024-06-12 20:46:27 +02:00
parent 1169ce68a5
commit a369bc2d05
6 changed files with 68 additions and 98 deletions

View File

@@ -51,6 +51,8 @@ uint32_t dr[8];
uint32_t use32;
int stack32;
int cpu_init = 0;
uint32_t *eal_r;
uint32_t *eal_w;

View File

@@ -350,6 +350,9 @@ exec386_dynarec_int(void)
CPU_BLOCK_END();
}
if (cpu_init)
CPU_BLOCK_END();
if (cpu_state.abrt)
CPU_BLOCK_END();
if (smi_line)
@@ -592,6 +595,9 @@ exec386_dynarec_dyn(void)
# endif
CPU_BLOCK_END();
if (cpu_init)
CPU_BLOCK_END();
if ((cpu_state.flags & T_FLAG) || (trap == 2))
CPU_BLOCK_END();
if (smi_line)
@@ -689,6 +695,9 @@ exec386_dynarec_dyn(void)
# endif
CPU_BLOCK_END();
if (cpu_init)
CPU_BLOCK_END();
if (cpu_state.flags & T_FLAG)
CPU_BLOCK_END();
if (smi_line)
@@ -768,6 +777,11 @@ exec386_dynarec(int32_t cycs)
exec386_dynarec_dyn();
}
if (cpu_init) {
cpu_init = 0;
resetx86();
}
if (cpu_state.abrt) {
flags_rebuild();
tempi = cpu_state.abrt & ABRT_MASK;

View File

@@ -29,6 +29,7 @@
#define HAVE_STDARG_H
#include <86box/86box.h>
#include "cpu.h"
#include "x86.h"
#include "x87_sf.h"
#include <86box/device.h>
#include <86box/machine.h>
@@ -504,7 +505,8 @@ cpu_set(void)
acycs = 0;
#endif
soft_reset_pci = 0;
soft_reset_pci = 0;
cpu_init = 0;
cpu_alt_reset = 0;
unmask_a20_in_smm = 0;

View File

@@ -59,6 +59,8 @@ extern int nmi_enable;
extern int oddeven;
extern int inttype;
extern int cpu_init;
extern uint32_t use32;
extern uint32_t rmdat;
extern uint32_t easeg;