Rewritten 808x CPU emulation core based on reenigne's XTCE, VisiOn, SnatchIt, and 8088 MPH now work correctly;

Fixed PC speaker sound volume in PIT mode 0;
A few CPU emulation clean-ups;
Hard disk controller changing redone in a less messy way;
Re-added the long-missing key send delay handling to the XT keyboard handler;
Fixed a bug that was causing SLiRP not to work when compiled with MingW/GCC 7.3.0-2 or newer;
Some serial mouse and port fixes;
A lot of changes to printer emulation, mostly based on DOSBox-X;
Printer PNG writer now uses statically linked libpng;
Added support for the HxC MFM floppy image format and upped 86F format version to 2.12;
Ported various things from PCem and some from VARCem;
Added the S3 86c801/805 emulation (patch from TheCollector1995);
Fixed and renamed the EGA monitor options;
Better synchronized the 808x to the PIT and the CGA;
Fixed the CGA wait state calculation;
Cleaned up some things in mem.c;
Fixed some things in the floppy emulation to make VisiOn get the correct errors from the copy protection disk;
Fixed several renderer-related bugs, including the SDL2 renderer's failure to take screenshots;
The Jenkins builds are now compiled with MingW/GCC 7.4.0-1 and include all the required DLL's.
This commit is contained in:
OBattler
2019-02-06 03:34:39 +01:00
parent c91b1f2b8e
commit 46d0ed2baa
104 changed files with 7749 additions and 6608 deletions

View File

@@ -225,7 +225,7 @@ void* fluidsynth_init(const device_t *info)
/* Try loading the DLL. */
#ifdef _WIN32
fluidsynth_handle = dynld_module("libfluidsynth-1.dll", fluidsynth_imports);
fluidsynth_handle = dynld_module("libfluidsynth.dll", fluidsynth_imports);
#else
fluidsynth_handle = dynld_module("libfluidsynth.so", fluidsynth_imports);
#endif

View File

@@ -111,7 +111,9 @@ const lpt_device_t lpt_dac_device =
dac_close,
dac_write_data,
dac_write_ctrl,
dac_read_status
NULL,
dac_read_status,
NULL
};
const lpt_device_t lpt_dac_stereo_device =
{
@@ -120,5 +122,7 @@ const lpt_device_t lpt_dac_stereo_device =
dac_close,
dac_write_data,
dac_write_ctrl,
dac_read_status
NULL,
dac_read_status,
NULL
};

View File

@@ -116,5 +116,7 @@ const lpt_device_t dss_device =
dss_close,
dss_write_data,
dss_write_ctrl,
dss_read_status
NULL,
dss_read_status,
NULL
};

View File

@@ -8,61 +8,62 @@
#include "snd_speaker.h"
int speaker_mute = 0;
int speaker_gated = 0;
int speaker_mute = 0, speaker_gated = 0;
int speaker_enable = 0, was_speaker_enable = 0;
int gated,speakval,speakon;
static int16_t speaker_buffer[SOUNDBUFLEN];
static int32_t speaker_buffer[SOUNDBUFLEN];
static int speaker_pos = 0;
void speaker_update(void)
void
speaker_update(void)
{
int16_t val;
for (; speaker_pos < sound_pos_global; speaker_pos++)
{
if (speaker_gated && was_speaker_enable)
{
if (!pit.m[2] || pit.m[2]==4)
val = speakval;
else if (pit.l[2] < 0x40)
val = 0xa00;
else
val = speakon ? 0x1400 : 0;
}
else
val = was_speaker_enable ? 0x1400 : 0;
int32_t val;
if (!speaker_enable)
was_speaker_enable = 0;
if (speaker_pos >= sound_pos_global)
return;
speaker_buffer[speaker_pos] = val;
}
}
for (; speaker_pos < sound_pos_global; speaker_pos++) {
if (speaker_gated && was_speaker_enable) {
if (!pit.m[2] || pit.m[2]==4)
val = speakval;
else if (pit.l[2] < 0x40)
val = 0xa00;
else
val = speakon ? 0x1400 : 0;
} else
val = was_speaker_enable ? 0x1400 : 0;
static void speaker_get_buffer(int32_t *buffer, int len, void *p)
{
int c;
if (!speaker_enable)
was_speaker_enable = 0;
speaker_update();
if (!speaker_mute)
{
for (c = 0; c < len * 2; c++)
buffer[c] += speaker_buffer[c >> 1];
}
speaker_pos = 0;
speaker_buffer[speaker_pos] = val;
}
}
void speaker_init(void)
static void
speaker_get_buffer(int32_t *buffer, int len, void *p)
{
sound_add_handler(speaker_get_buffer, NULL);
speaker_mute = 0;
int c;
speaker_update();
if (!speaker_mute) {
for (c = 0; c < len * 2; c++)
buffer[c] += speaker_buffer[c >> 1];
}
speaker_pos = 0;
}
void
speaker_init(void)
{
sound_add_handler(speaker_get_buffer, NULL);
speaker_mute = 0;
}

View File

@@ -8,7 +8,7 @@
*
* Sound emulation core.
*
* Version: @(#)sound.c 1.0.25 2018/10/28
* Version: @(#)sound.c 1.0.26 2019/01/13
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -439,6 +439,10 @@ sound_card_reset(void)
mpu401_device_add();
if (GUS)
device_add(&gus_device);
#if defined(DEV_BRANCH) && defined(USE_GUSMAX)
if (GUSMAX)
device_add(&gusmax_device);
#endif
if (GAMEBLASTER)
device_add(&cms_device);
if (SSI2001)