CD-ROM images are now working correctly again;

Fixed all the reported bugs regarding the Settings dialog;
MIDI out device is now no longer reset to 0 after hard reset;
Removed all vestiges of the old disk activity flash;
The configuration file is no longer saved when it shouldn't be;
Redone the status bar icon updating so it is only done in win.c;
Made sure all variables in ibm.h are extern;
A lot of other bugfixes;
Added Mouse Systems Mouse emulation (patch from TheCollector1995);
Added IBM PS/1 Model 2133 (486) emulation (patch from TheCollector1995);
Tweaked the CPU dynamic recompiler cycle periods - 486SX 33 and 486DX 33 now work;
Increased compatibility with configuration files from before the previous commit.
This commit is contained in:
OBattler
2017-05-29 01:18:32 +02:00
parent 84480b7347
commit fc2a293536
54 changed files with 740 additions and 372 deletions

View File

@@ -28,6 +28,7 @@ typedef struct mouse_serial_t {
delay;
int oldb;
SERIAL *serial;
int is_ms_format;
} mouse_serial_t;
@@ -50,11 +51,12 @@ sermouse_timer(void *priv)
mouse_serial_t *ms = (mouse_serial_t *)priv;
ms->delay = 0;
if (ms->pos == -1) {
ms->pos = 0;
if (ms->pos == -1)
{
ms->pos = 0;
/* This identifies a two-button Microsoft Serial mouse. */
serial_write_fifo(ms->serial, 'M');
/* This identifies a two-button Microsoft Serial mouse. */
serial_write_fifo(ms->serial, 'M');
}
}
@@ -130,3 +132,61 @@ mouse_t mouse_serial_microsoft = {
sermouse_close,
sermouse_poll
};
static uint8_t
mssystems_mouse_poll(int x, int y, int z, int b, void *priv)
{
mouse_serial_t *ms = (mouse_serial_t *)priv;
uint8_t data[5];
if (!x && !y && b == ms->oldb) return(1);
ms->oldb = b;
y=-y;
if (x>127) x = 127;
if (y>127) y = 127;
if (x<-128) x = -128;
if (y<-128) y = -128;
data[0] = 0x80 | ((((b & 0x04) >> 1) + ((b & 0x02) << 1) + (b & 0x01)) ^ 0x07);
data[1] = x;
data[2] = y;
data[3] = 0;
data[4] = 0;
pclog("Mouse_Systems_Serial: data %02X %02X %02X\n", data[0], data[1], data[2]);
serial_write_fifo(ms->serial, data[0]);
serial_write_fifo(ms->serial, data[1]);
serial_write_fifo(ms->serial, data[2]);
serial_write_fifo(ms->serial, data[3]);
serial_write_fifo(ms->serial, data[4]);
return(0);
}
static void *
mssystems_mouse_init(void)
{
mouse_serial_t *ms = (mouse_serial_t *)malloc(sizeof(mouse_serial_t));
memset(ms, 0x00, sizeof(mouse_serial_t));
ms->port = SERMOUSE_PORT;
/* Attach a serial port to the mouse. */
ms->serial = serial_attach(ms->port, sermouse_callback, ms);
timer_add(sermouse_timer, &ms->delay, &ms->delay, ms);
return(ms);
}
mouse_t mouse_msystems = {
"Mouse Systems Mouse (serial)",
"mssystems",
MOUSE_TYPE_MSYSTEMS,
mssystems_mouse_init,
sermouse_close,
mssystems_mouse_poll
};