Merge branch 'master' of github.com:86Box/86Box into tc1995
This commit is contained in:
@@ -886,6 +886,8 @@ piix_read(int func, int addr, void *priv)
|
||||
if ((func <= dev->max_func) || ((func == 1) && (dev->max_func == 0))) {
|
||||
fregs = (uint8_t *) dev->regs[func];
|
||||
ret = fregs[addr];
|
||||
if ((func == 0) && (addr == 0x4e))
|
||||
ret |= keyboard_at_get_mouse_scan();
|
||||
|
||||
piix_log("PIIX function %i read: %02X from %02X\n", func, ret, addr);
|
||||
}
|
||||
|
@@ -1432,9 +1432,9 @@ load_other_removable_devices(void)
|
||||
sprintf(temp, "mo_%02i_parameters", c+1);
|
||||
p = config_get_string(cat, temp, NULL);
|
||||
if (p != NULL)
|
||||
sscanf(p, "%01u, %s", &mo_drives[c].type, s);
|
||||
sscanf(p, "%u, %s", &mo_drives[c].type, s);
|
||||
else
|
||||
sscanf("0, none", "%01u, %s", &mo_drives[c].type, s);
|
||||
sscanf("00, none", "%u, %s", &mo_drives[c].type, s);
|
||||
mo_drives[c].bus_type = hdd_string_to_bus(s, 1);
|
||||
|
||||
/* Default values, needed for proper operation of the Settings dialog. */
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -179,18 +179,21 @@ ps2_write(uint8_t val, void *priv)
|
||||
|
||||
case 0xf4: /* enable */
|
||||
dev->flags |= FLAG_ENABLED;
|
||||
mouse_scan = 1;
|
||||
keyboard_at_adddata_mouse(0xfa);
|
||||
break;
|
||||
|
||||
case 0xf5: /* disable */
|
||||
dev->flags &= ~FLAG_ENABLED;
|
||||
mouse_scan = 0;
|
||||
keyboard_at_adddata_mouse(0xfa);
|
||||
break;
|
||||
|
||||
case 0xff: /* reset */
|
||||
dev->mode = MODE_STREAM;
|
||||
dev->flags &= 0x88;
|
||||
mouse_queue_start = mouse_queue_end = 0;
|
||||
mouse_scan = 0;
|
||||
keyboard_at_mouse_reset();
|
||||
keyboard_at_adddata_mouse(0xfa);
|
||||
keyboard_at_adddata_mouse(0xaa);
|
||||
keyboard_at_adddata_mouse(0x00);
|
||||
@@ -236,7 +239,7 @@ ps2_poll(int x, int y, int z, int b, void *priv)
|
||||
dev->y -= y;
|
||||
dev->z -= z;
|
||||
if ((dev->mode == MODE_STREAM) && (dev->flags & FLAG_ENABLED) &&
|
||||
(((mouse_queue_end - mouse_queue_start) & 0x0f) < 13)) {
|
||||
(keyboard_at_mouse_pos() < 13)) {
|
||||
dev->b = b;
|
||||
|
||||
if (dev->x > 255) dev->x = 255;
|
||||
|
@@ -103,6 +103,8 @@ extern int keyboard_ismsexit(void);
|
||||
|
||||
extern void keyboard_at_adddata_keyboard_raw(uint8_t val);
|
||||
extern void keyboard_at_adddata_mouse(uint8_t val);
|
||||
extern void keyboard_at_mouse_reset(void);
|
||||
extern uint8_t keyboard_at_mouse_pos(void);
|
||||
extern void keyboard_at_set_mouse(void (*mouse_write)(uint8_t val,void *), void *);
|
||||
extern void keyboard_at_set_a20_key(int state);
|
||||
extern uint8_t keyboard_at_get_mouse_scan(void);
|
||||
|
@@ -567,6 +567,11 @@ pit_write(uint16_t addr, uint8_t val, void *priv)
|
||||
ctr->null_count = 1;
|
||||
ctr_set_out(ctr, !!ctr->m);
|
||||
ctr->state = 0;
|
||||
if (ctr->latched) {
|
||||
pit_log("PIT %i: Reload while counter is latched\n", t);
|
||||
ctr->rl--;
|
||||
}
|
||||
|
||||
pit_log("PIT %i: M = %i, RM/WM = %i, State = %i, Out = %i\n", t, ctr->m, ctr->rm, ctr->state, ctr->out);
|
||||
}
|
||||
}
|
||||
|
@@ -102,7 +102,10 @@ timer_control(opl_t *dev, int tmr, int start)
|
||||
if (start) {
|
||||
opl_log("Loading timer %i count: %02X = %02X\n", tmr, dev->timer_cur_count[tmr], dev->timer_count[tmr]);
|
||||
dev->timer_cur_count[tmr] = dev->timer_count[tmr];
|
||||
timer_on_auto(&dev->timers[tmr], (tmr == 1) ? 320.0 : 80.0);
|
||||
if (dev->flags & FLAG_OPL3)
|
||||
timer_tick(dev, tmr); /* Per the YMF 262 datasheet, OPL3 starts counting immediately, unlike OPL2. */
|
||||
else
|
||||
timer_on_auto(&dev->timers[tmr], (tmr == 1) ? 320.0 : 80.0);
|
||||
} else
|
||||
opl_log("Timer %i stopped\n", tmr);
|
||||
}
|
||||
@@ -163,9 +166,9 @@ opl_write(opl_t *dev, uint16_t port, uint8_t val)
|
||||
opl_log("Resetting timer status...\n");
|
||||
dev->status &= ~STAT_TMR_OVER;
|
||||
} else {
|
||||
dev->timer_ctrl = val;
|
||||
timer_control(dev, 0, val & CTRL_TMR1_START);
|
||||
timer_control(dev, 1, val & CTRL_TMR2_START);
|
||||
dev->timer_ctrl = val;
|
||||
opl_log("Status mask now %02X (val = %02X)\n", (val & ~CTRL_TMR_MASK) & CTRL_TMR_MASK, val);
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user