Merge branch 'master' of https://github.com/86Box/86Box
This commit is contained in:
@@ -3149,6 +3149,10 @@ void cpu_WRMSR()
|
||||
case 0x10:
|
||||
tsc = EAX | ((uint64_t)EDX << 32);
|
||||
break;
|
||||
case 0x8B:
|
||||
cpu_log("WRMSR: Invalid MSR: 0x8B/n"); /*Needed for Vista to correctly break on Pentium*/
|
||||
x86gpf(NULL, 0);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86)
|
||||
|
10
src/io.c
10
src/io.c
@@ -154,13 +154,14 @@ io_removehandler(uint16_t base, int size,
|
||||
void *priv)
|
||||
{
|
||||
int c;
|
||||
io_t *p;
|
||||
io_t *p, *q;
|
||||
|
||||
for (c = 0; c < size; c++) {
|
||||
p = io[base + c];
|
||||
if (!p)
|
||||
continue;
|
||||
while(p) {
|
||||
q = p->next;
|
||||
if ((p->inb == inb) && (p->inw == inw) &&
|
||||
(p->inl == inl) && (p->outb == outb) &&
|
||||
(p->outw == outw) && (p->outl == outl) &&
|
||||
@@ -177,7 +178,7 @@ io_removehandler(uint16_t base, int size,
|
||||
p = NULL;
|
||||
break;
|
||||
}
|
||||
p = p->next;
|
||||
p = q;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -251,7 +252,7 @@ io_removehandler_interleaved(uint16_t base, int size,
|
||||
void *priv)
|
||||
{
|
||||
int c;
|
||||
io_t *p;
|
||||
io_t *p, *q;
|
||||
|
||||
size <<= 2;
|
||||
for (c = 0; c < size; c += 2) {
|
||||
@@ -259,6 +260,7 @@ io_removehandler_interleaved(uint16_t base, int size,
|
||||
if (!p)
|
||||
return;
|
||||
while(p) {
|
||||
q = p->next;
|
||||
if ((p->inb == inb) && (p->inw == inw) &&
|
||||
(p->inl == inl) && (p->outb == outb) &&
|
||||
(p->outw == outw) && (p->outl == outl) &&
|
||||
@@ -270,7 +272,7 @@ io_removehandler_interleaved(uint16_t base, int size,
|
||||
free(p);
|
||||
break;
|
||||
}
|
||||
p = p->next;
|
||||
p = q;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
12
src/mem.c
12
src/mem.c
@@ -1678,9 +1678,9 @@ void
|
||||
mem_write_ramb_page(uint32_t addr, uint8_t val, page_t *p)
|
||||
{
|
||||
#ifdef USE_DYNAREC
|
||||
if (val != p->mem[addr & 0xfff] || codegen_in_recompile) {
|
||||
if ((p == NULL) || (p->mem == NULL) || (val != p->mem[addr & 0xfff]) || codegen_in_recompile) {
|
||||
#else
|
||||
if (val != p->mem[addr & 0xfff]) {
|
||||
if ((p == NULL) || (p->mem == NULL) || (val != p->mem[addr & 0xfff])) {
|
||||
#endif
|
||||
uint64_t mask = (uint64_t)1 << ((addr >> PAGE_MASK_SHIFT) & PAGE_MASK_MASK);
|
||||
p->dirty_mask[(addr >> PAGE_MASK_INDEX_SHIFT) & PAGE_MASK_INDEX_MASK] |= mask;
|
||||
@@ -1693,9 +1693,9 @@ void
|
||||
mem_write_ramw_page(uint32_t addr, uint16_t val, page_t *p)
|
||||
{
|
||||
#ifdef USE_DYNAREC
|
||||
if (val != *(uint16_t *)&p->mem[addr & 0xfff] || codegen_in_recompile) {
|
||||
if ((p == NULL) || (p->mem == NULL) || (val != *(uint16_t *)&p->mem[addr & 0xfff]) || codegen_in_recompile) {
|
||||
#else
|
||||
if (val != *(uint16_t *)&p->mem[addr & 0xfff]) {
|
||||
if ((p == NULL) || (p->mem == NULL) || (val != *(uint16_t *)&p->mem[addr & 0xfff])) {
|
||||
#endif
|
||||
uint64_t mask = (uint64_t)1 << ((addr >> PAGE_MASK_SHIFT) & PAGE_MASK_MASK);
|
||||
if ((addr & 0xf) == 0xf)
|
||||
@@ -1710,9 +1710,9 @@ void
|
||||
mem_write_raml_page(uint32_t addr, uint32_t val, page_t *p)
|
||||
{
|
||||
#ifdef USE_DYNAREC
|
||||
if (val != *(uint32_t *)&p->mem[addr & 0xfff] || codegen_in_recompile) {
|
||||
if ((p == NULL) || (p->mem == NULL) || (val != *(uint32_t *)&p->mem[addr & 0xfff]) || codegen_in_recompile) {
|
||||
#else
|
||||
if (val != *(uint32_t *)&p->mem[addr & 0xfff]) {
|
||||
if ((p == NULL) || (p->mem == NULL) || (val != *(uint32_t *)&p->mem[addr & 0xfff])) {
|
||||
#endif
|
||||
uint64_t mask = (uint64_t)1 << ((addr >> PAGE_MASK_SHIFT) & PAGE_MASK_MASK);
|
||||
if ((addr & 0xf) >= 0xd)
|
||||
|
@@ -350,6 +350,7 @@ network_attach(void *dev, uint8_t *mac, NETRXCB rx, NETWAITCB wait, NETSETLINKST
|
||||
|
||||
first_pkt[0] = first_pkt[1] = NULL;
|
||||
last_pkt[0] = last_pkt[1] = NULL;
|
||||
memset(&network_rx_queue_timer, 0x00, sizeof(pc_timer_t));
|
||||
timer_add(&network_rx_queue_timer, network_rx_queue, NULL, 0);
|
||||
/* 10 mbps. */
|
||||
timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0);
|
||||
|
15
src/timer.c
15
src/timer.c
@@ -110,8 +110,10 @@ timer_remove_head(void)
|
||||
if (timer_head) {
|
||||
timer = timer_head;
|
||||
timer_head = timer->next;
|
||||
if (timer_head)
|
||||
if (timer_head) {
|
||||
timer_head->prev = NULL;
|
||||
timer->next->prev = NULL;
|
||||
}
|
||||
timer->next = timer->prev = NULL;
|
||||
timer->flags &= ~TIMER_ENABLED;
|
||||
}
|
||||
@@ -151,6 +153,17 @@ timer_process(void)
|
||||
void
|
||||
timer_close(void)
|
||||
{
|
||||
pc_timer_t *t = timer_head, *r;
|
||||
|
||||
/* Set all timers' prev and next to NULL so it is assured that
|
||||
timers that are not in malloc'd structs don't keep pointing
|
||||
to timers that may be in malloc'd structs. */
|
||||
while (t != NULL) {
|
||||
r = t;
|
||||
r->prev = r->next = NULL;
|
||||
t = r->next;
|
||||
}
|
||||
|
||||
timer_head = NULL;
|
||||
|
||||
timer_inited = 0;
|
||||
|
Reference in New Issue
Block a user