Packard Bell machines: PS/2 mouse commands now suspend dynamic recompilation until the response byte is read, fixes #552.
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
|
||||
#define CPU_BLOCK_END() cpu_block_end = 1
|
||||
|
||||
int cpu_override_dynarec = 0;
|
||||
int inrecomp = 0;
|
||||
int cpu_block_end = 0;
|
||||
int cpu_end_block_after_ins = 0;
|
||||
@@ -718,7 +719,7 @@ exec386_dynarec(int32_t cycs)
|
||||
cycles_old = cycles;
|
||||
oldtsc = tsc;
|
||||
tsc_old = tsc;
|
||||
if (!CACHE_ON()) /*Interpret block*/
|
||||
if ((!CACHE_ON()) || cpu_override_dynarec) /*Interpret block*/
|
||||
{
|
||||
exec386_dynarec_int();
|
||||
} else {
|
||||
|
@@ -833,6 +833,9 @@ extern void nmi_raise(void);
|
||||
extern MMX_REG *MMP[8];
|
||||
extern uint16_t *MMEP[8];
|
||||
|
||||
extern int cpu_block_end;
|
||||
extern int cpu_override_dynarec;
|
||||
|
||||
extern void mmx_init(void);
|
||||
extern void prefetch_flush(void);
|
||||
|
||||
|
@@ -1787,6 +1787,9 @@ kbc_at_process_cmd(void *priv)
|
||||
if (dev->ib == 0xbb)
|
||||
break;
|
||||
|
||||
if (strstr(machine_get_internal_name(), "pb") != NULL)
|
||||
cpu_override_dynarec = 1;
|
||||
|
||||
if (dev->misc_flags & FLAG_PS2) {
|
||||
set_enable_aux(dev, 1);
|
||||
if ((dev->ports[1] != NULL) && (dev->ports[1]->priv != NULL)) {
|
||||
@@ -1891,6 +1894,8 @@ kbc_at_read(uint16_t port, void *priv)
|
||||
This also means that in AT mode, the IRQ is level-triggered. */
|
||||
if (!(dev->misc_flags & FLAG_PS2))
|
||||
picintclevel(1 << 1, &dev->irq_state);
|
||||
if ((strstr(machine_get_internal_name(), "pb") != NULL) && (cpu_override_dynarec == 1))
|
||||
cpu_override_dynarec = 0;
|
||||
break;
|
||||
|
||||
case 0x64:
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/device.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/mouse.h>
|
||||
@@ -276,6 +277,7 @@ ps2_write(void *priv)
|
||||
break;
|
||||
|
||||
default:
|
||||
mouse_ps2_log("%s: Bad command: %02X\n", dev->name, val);
|
||||
kbc_at_dev_queue_add(dev, 0xfe, 0);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user