Vastly overhauled the UI, there's now a completely new Settings dialog as well as a status bar with disk activity icons and removable drive menus;

Thoroughly clean up the code to vastly reduce the number of compiler warnings and found and fixed several bugs in the process;
Applied all mainline PCem commits;
Added SCSI hard disk emulation;
Commented out all unfinished machines and graphics cards;
Added the AOpen AP53 and ASUS P/I-P55T2 machines as well as another Tyan 440FX machine, all three with AMI WinBIOS (patch from TheCollector1995);
Added the Diamond Stealth 3D 3000 (S3 ViRGE/VX) graphics card (patch from TheCollector1995);
Added the PS/2 XT IDE (AccuLogic) HDD Controller (patch from TheCollector1995);
Added Microsoft/Logitech Bus Mouse emulation (patch from waltje);
Overhauled the makefiles (patch from waltje);
Added the Adaptec AHA-1542CF SCSI controller (patch from waltje);
Added preliminary (but still unfinished) Adaptec AHA-154x SCSI controller BIOS support (patch from waltje);
Added an ISABugger debugging device (patch from waltje);
Added sanity checks to the Direct3D code.
This commit is contained in:
OBattler
2017-05-05 01:49:42 +02:00
parent d07d53962c
commit f6ef1f833c
346 changed files with 24292 additions and 18058 deletions

View File

@@ -1,7 +1,9 @@
#include <stdlib.h>
#include "ibm.h"
#include "io.h"
#include "device.h"
#include "sound.h"
#include "mca.h"
#include "sound_adlib.h"
#include "sound_opl.h"
@@ -9,6 +11,8 @@
typedef struct adlib_t
{
opl_t opl;
uint8_t pos_regs[8];
} adlib_t;
static void adlib_get_buffer(int32_t *buffer, int len, void *p)
@@ -24,6 +28,36 @@ static void adlib_get_buffer(int32_t *buffer, int len, void *p)
adlib->opl.pos = 0;
}
uint8_t adlib_mca_read(int port, void *p)
{
adlib_t *adlib = (adlib_t *)p;
pclog("adlib_mca_read: port=%04x\n", port);
return adlib->pos_regs[port & 7];
}
void adlib_mca_write(int port, uint8_t val, void *p)
{
adlib_t *adlib = (adlib_t *)p;
if (port < 0x102)
return;
pclog("adlib_mca_write: port=%04x val=%02x\n", port, val);
switch (port)
{
case 0x102:
if ((adlib->pos_regs[2] & 1) && !(val & 1))
io_removehandler(0x0388, 0x0002, opl2_read, NULL, NULL, opl2_write, NULL, NULL, &adlib->opl);
if (!(adlib->pos_regs[2] & 1) && (val & 1))
io_sethandler(0x0388, 0x0002, opl2_read, NULL, NULL, opl2_write, NULL, NULL, &adlib->opl);
break;
}
adlib->pos_regs[port & 7] = val;
}
void *adlib_init()
{
adlib_t *adlib = malloc(sizeof(adlib_t));
@@ -36,6 +70,18 @@ void *adlib_init()
return adlib;
}
void *adlib_mca_init()
{
adlib_t *adlib = adlib_init();
io_removehandler(0x0388, 0x0002, opl2_read, NULL, NULL, opl2_write, NULL, NULL, &adlib->opl);
mca_add(adlib_mca_read, adlib_mca_write, adlib);
adlib->pos_regs[0] = 0xd7;
adlib->pos_regs[1] = 0x70;
return adlib;
}
void adlib_close(void *p)
{
adlib_t *adlib = (adlib_t *)p;
@@ -54,3 +100,15 @@ device_t adlib_device =
NULL,
NULL
};
device_t adlib_mca_device =
{
"AdLib (MCA)",
DEVICE_MCA,
adlib_init,
adlib_close,
NULL,
NULL,
NULL,
NULL
};