Merge branch '86Box:master' into master

This commit is contained in:
bozoscum
2025-10-22 18:28:05 +08:00
committed by GitHub
56 changed files with 1272 additions and 1222 deletions

View File

@@ -141,7 +141,7 @@ serial_update_ints(serial_t *dev)
}
}
serial_do_irq(dev, !(dev->iir & 0x01) && ((dev->mctrl & 8) || (dev->type == SERIAL_8250_PCJR)));
serial_do_irq(dev, !(dev->iir & 0x01) && ((dev->mctrl & 8) || ((dev->type == SERIAL_8250_PCJR_3F8) || (dev->type == SERIAL_8250_PCJR_2F8))));
}
static void
@@ -971,15 +971,20 @@ serial_init(const device_t *info)
serial_setup(dev, COM4_ADDR, COM4_IRQ);
else if (next_inst == 2)
serial_setup(dev, COM3_ADDR, COM3_IRQ);
else if ((next_inst == 1) || (info->local == SERIAL_8250_PCJR))
else if ((next_inst == 1) || (info->local == SERIAL_8250_PCJR_2F8))
serial_setup(dev, COM2_ADDR, COM2_IRQ);
// TODO
#if 0
else if ((next_inst == 1) || (info->local == SERIAL_8250_PCJR_3F8))
serial_setup(dev, COM1_ADDR, COM1_IRQ);
#endif
else if (next_inst == 0)
serial_setup(dev, COM1_ADDR, COM1_IRQ);
/* Default to 1200,N,7. */
dev->dlab = 96;
dev->fcr = 0x06;
if (info->local == SERIAL_8250_PCJR)
if ((info->local == SERIAL_8250_PCJR_3F8) || (info->local == SERIAL_8250_PCJR_2F8))
dev->clock_src = 1789500.0;
else
dev->clock_src = 1843200.0;
@@ -1039,11 +1044,25 @@ const device_t ns8250_device = {
.config = NULL
};
const device_t ns8250_pcjr_device = {
.name = "National Semiconductor 8250(-compatible) UART for PCjr",
.internal_name = "ns8250_pcjr",
const device_t ns8250_pcjr_3f8_device = {
.name = "National Semiconductor 8250(-compatible) UART for PCjr (0x3f8)",
.internal_name = "ns8250_pcjr_3f8",
.flags = 0,
.local = SERIAL_8250_PCJR,
.local = SERIAL_8250_PCJR_3F8,
.init = serial_init,
.close = serial_close,
.reset = serial_reset,
.available = NULL,
.speed_changed = serial_speed_changed,
.force_redraw = NULL,
.config = NULL
};
const device_t ns8250_pcjr_2f8_device = {
.name = "National Semiconductor 8250(-compatible) UART for PCjr (0x2f8)",
.internal_name = "ns8250_pcjr_2f8",
.flags = 0,
.local = SERIAL_8250_PCJR_2F8,
.init = serial_init,
.close = serial_close,
.reset = serial_reset,

View File

@@ -44,34 +44,7 @@
#include <86box/timer.h>
#include <86box/gameport.h>
#include <86box/plat_unused.h>
static void *
ch_flightstick_pro_init(void)
{
return NULL;
}
static void
ch_flightstick_pro_close(UNUSED(void *priv))
{
//
}
static uint8_t
ch_flightstick_read(UNUSED(void *priv))
{
uint8_t ret = 0xf0;
uint8_t gp = 0;
if (JOYSTICK_PRESENT(gp, 0)) {
if (joystick_state[gp][0].button[0])
ret &= ~0x10;
if (joystick_state[gp][0].button[1])
ret &= ~0x20;
}
return ret;
}
#include <86box/joystick.h>
static uint8_t
ch_flightstick_pro_read(UNUSED(void *priv))
@@ -169,179 +142,123 @@ ch_virtual_pilot_pro_read(UNUSED(void *priv))
return ret;
}
static void
ch_flightstick_pro_write(UNUSED(void *priv))
{
//
}
static int
ch_flightstick_pro_read_axis(UNUSED(void *priv), int axis)
{
uint8_t gp = 0;
if (!JOYSTICK_PRESENT(gp, 0))
return AXIS_NOT_PRESENT;
switch (axis) {
case 0:
return joystick_state[gp][0].axis[0];
case 1:
return joystick_state[gp][0].axis[1];
case 2:
return 0;
case 3:
return joystick_state[gp][0].axis[2];
default:
return 0;
}
}
static int
ch_flightstick_pro_ch_pedals_read_axis(UNUSED(void *priv), int axis)
{
uint8_t gp = 0;
if (!JOYSTICK_PRESENT(gp, 0))
return AXIS_NOT_PRESENT;
switch (axis) {
case 0:
return joystick_state[gp][0].axis[0];
case 1:
return joystick_state[gp][0].axis[1];
case 2:
return joystick_state[gp][0].axis[3];
case 3:
return joystick_state[gp][0].axis[2];
default:
return 0;
}
}
static void
ch_flightstick_pro_a0_over(UNUSED(void *priv))
{
//
}
const joystick_t joystick_ch_flightstick = {
.name = "CH Flightstick",
.internal_name = "ch_flightstick",
.init = ch_flightstick_pro_init,
.close = ch_flightstick_pro_close,
.read = ch_flightstick_read,
.write = ch_flightstick_pro_write,
.read_axis = ch_flightstick_pro_read_axis,
.a0_over = ch_flightstick_pro_a0_over,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = joystick_standard_read_2button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_3axis_throttle,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 2,
.pov_count = 0,
.max_joysticks = 1,
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle" },
.button_names = { "Button 1", "Button 2" },
.button_names = { "Trigger", "Button 2" },
.pov_names = { NULL }
};
const joystick_t joystick_ch_flightstick_ch_pedals = {
.name = "CH Flightstick + CH Pedals",
.internal_name = "ch_flightstick_ch_pedals",
.init = ch_flightstick_pro_init,
.close = ch_flightstick_pro_close,
.read = ch_flightstick_read,
.write = ch_flightstick_pro_write,
.read_axis = ch_flightstick_pro_ch_pedals_read_axis,
.a0_over = ch_flightstick_pro_a0_over,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = joystick_standard_read_2button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_4axis,
.a0_over = joystick_standard_a0_over,
.axis_count = 4,
.button_count = 2,
.pov_count = 0,
.max_joysticks = 1,
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" },
.button_names = { "Button 1", "Button 2" },
.button_names = { "Trigger", "Button 2" },
.pov_names = { NULL }
};
const joystick_t joystick_ch_flightstick_ch_pedals_pro = {
.name = "CH Flightstick + CH Pedals Pro",
.internal_name = "ch_flightstick_ch_pedals_pro",
.init = ch_flightstick_pro_init,
.close = ch_flightstick_pro_close,
.read = ch_flightstick_read,
.write = ch_flightstick_pro_write,
.read_axis = ch_flightstick_pro_ch_pedals_read_axis,
.a0_over = ch_flightstick_pro_a0_over,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = joystick_standard_read_2button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_4axis,
.a0_over = joystick_standard_a0_over,
.axis_count = 4,
.button_count = 2,
.pov_count = 0,
.max_joysticks = 1,
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Right Pedal", "Left Pedal" },
.button_names = { "Button 1", "Button 2" },
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Left Pedal", "Right Pedal" },
.button_names = { "Trigger", "Button 2" },
.pov_names = { NULL }
};
const joystick_t joystick_ch_flightstick_pro = {
.name = "CH Flightstick Pro",
.internal_name = "ch_flightstick_pro",
.init = ch_flightstick_pro_init,
.close = ch_flightstick_pro_close,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = ch_flightstick_pro_read,
.write = ch_flightstick_pro_write,
.read_axis = ch_flightstick_pro_read_axis,
.a0_over = ch_flightstick_pro_a0_over,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_3axis_throttle,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 4,
.pov_count = 1,
.max_joysticks = 1,
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle" },
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4" },
.button_names = { "Trigger", "Button 2", "Button 3", "Button 4" },
.pov_names = { "POV" }
};
const joystick_t joystick_ch_flightstick_pro_ch_pedals = {
.name = "CH Flightstick Pro + CH Pedals",
.internal_name = "ch_flightstick_pro_ch_pedals",
.init = ch_flightstick_pro_init,
.close = ch_flightstick_pro_close,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = ch_flightstick_pro_read,
.write = ch_flightstick_pro_write,
.read_axis = ch_flightstick_pro_ch_pedals_read_axis,
.a0_over = ch_flightstick_pro_a0_over,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_4axis,
.a0_over = joystick_standard_a0_over,
.axis_count = 4,
.button_count = 4,
.pov_count = 1,
.max_joysticks = 1,
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" },
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4" },
.button_names = { "Trigger", "Button 2", "Button 3", "Button 4" },
.pov_names = { "POV" }
};
const joystick_t joystick_ch_flightstick_pro_ch_pedals_pro = {
.name = "CH Flightstick Pro + CH Pedals Pro",
.internal_name = "ch_flightstick_pro_ch_pedals_pro",
.init = ch_flightstick_pro_init,
.close = ch_flightstick_pro_close,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = ch_flightstick_pro_read,
.write = ch_flightstick_pro_write,
.read_axis = ch_flightstick_pro_ch_pedals_read_axis,
.a0_over = ch_flightstick_pro_a0_over,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_4axis,
.a0_over = joystick_standard_a0_over,
.axis_count = 4,
.button_count = 4,
.pov_count = 1,
.max_joysticks = 1,
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Right Pedal", "Left Pedal" },
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4" },
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Left Pedal", "Right Pedal" },
.button_names = { "Trigger", "Button 2", "Button 3", "Button 4" },
.pov_names = { "POV" }
};
const joystick_t joystick_ch_virtual_pilot = {
.name = "CH Virtual Pilot",
.internal_name = "ch_virtual_pilot",
.init = ch_flightstick_pro_init,
.close = ch_flightstick_pro_close,
.read = ch_flightstick_read,
.write = ch_flightstick_pro_write,
.read_axis = ch_flightstick_pro_read_axis,
.a0_over = ch_flightstick_pro_a0_over,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = joystick_standard_read_2button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_3axis_throttle,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 2,
.pov_count = 0,
@@ -354,12 +271,12 @@ const joystick_t joystick_ch_virtual_pilot = {
const joystick_t joystick_ch_virtual_pilot_ch_pedals = {
.name = "CH Virtual Pilot + CH Pedals",
.internal_name = "ch_virtual_pilot_ch_pedals",
.init = ch_flightstick_pro_init,
.close = ch_flightstick_pro_close,
.read = ch_flightstick_read,
.write = ch_flightstick_pro_write,
.read_axis = ch_flightstick_pro_ch_pedals_read_axis,
.a0_over = ch_flightstick_pro_a0_over,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = joystick_standard_read_2button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_4axis,
.a0_over = joystick_standard_a0_over,
.axis_count = 4,
.button_count = 2,
.pov_count = 0,
@@ -372,17 +289,17 @@ const joystick_t joystick_ch_virtual_pilot_ch_pedals = {
const joystick_t joystick_ch_virtual_pilot_ch_pedals_pro = {
.name = "CH Virtual Pilot + CH Pedals Pro",
.internal_name = "ch_virtual_pilot_ch_pedals_pro",
.init = ch_flightstick_pro_init,
.close = ch_flightstick_pro_close,
.read = ch_flightstick_read,
.write = ch_flightstick_pro_write,
.read_axis = ch_flightstick_pro_ch_pedals_read_axis,
.a0_over = ch_flightstick_pro_a0_over,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = joystick_standard_read_2button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_4axis,
.a0_over = joystick_standard_a0_over,
.axis_count = 4,
.button_count = 2,
.pov_count = 0,
.max_joysticks = 1,
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Right Pedal", "Left Pedal" },
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Left Pedal", "Right Pedal" },
.button_names = { "Button 1", "Button 2" },
.pov_names = { NULL }
};
@@ -390,12 +307,12 @@ const joystick_t joystick_ch_virtual_pilot_ch_pedals_pro = {
const joystick_t joystick_ch_virtual_pilot_pro = {
.name = "CH Virtual Pilot Pro",
.internal_name = "ch_virtual_pilot_pro",
.init = ch_flightstick_pro_init,
.close = ch_flightstick_pro_close,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = ch_virtual_pilot_pro_read,
.write = ch_flightstick_pro_write,
.read_axis = ch_flightstick_pro_read_axis,
.a0_over = ch_flightstick_pro_a0_over,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_3axis_throttle,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 6,
.pov_count = 2,
@@ -408,12 +325,12 @@ const joystick_t joystick_ch_virtual_pilot_pro = {
const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals = {
.name = "CH Virtual Pilot Pro + CH Pedals",
.internal_name = "ch_virtual_pilot_pro_ch_pedals",
.init = ch_flightstick_pro_init,
.close = ch_flightstick_pro_close,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = ch_virtual_pilot_pro_read,
.write = ch_flightstick_pro_write,
.read_axis = ch_flightstick_pro_ch_pedals_read_axis,
.a0_over = ch_flightstick_pro_a0_over,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_4axis,
.a0_over = joystick_standard_a0_over,
.axis_count = 4,
.button_count = 6,
.pov_count = 2,
@@ -426,17 +343,17 @@ const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals = {
const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals_pro = {
.name = "CH Virtual Pilot Pro + CH Pedals Pro",
.internal_name = "ch_virtual_pilot_pro_ch_pedals_pro",
.init = ch_flightstick_pro_init,
.close = ch_flightstick_pro_close,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = ch_virtual_pilot_pro_read,
.write = ch_flightstick_pro_write,
.read_axis = ch_flightstick_pro_ch_pedals_read_axis,
.a0_over = ch_flightstick_pro_a0_over,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_4axis,
.a0_over = joystick_standard_a0_over,
.axis_count = 4,
.button_count = 6,
.pov_count = 2,
.max_joysticks = 1,
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Right Pedal", "Left Pedal" },
.axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Left Pedal", "Right Pedal" },
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4", "Button 5", "Button 6" },
.pov_names = { "Right POV", "Left POV" }
};

View File

@@ -45,13 +45,13 @@
#include <86box/gameport.h>
#include <86box/plat_unused.h>
static void *
void *
joystick_standard_init(void)
{
return NULL;
}
static void
void
joystick_standard_close(UNUSED(void *priv))
{
//
@@ -101,6 +101,22 @@ joystick_standard_read(UNUSED(void *priv))
return ret;
}
uint8_t
joystick_standard_read_2button(UNUSED(void *priv))
{
uint8_t gp = 0;
uint8_t ret = 0xf0;
if (JOYSTICK_PRESENT(gp, 0)) {
if (joystick_state[gp][0].button[0])
ret &= ~0x10;
if (joystick_state[gp][0].button[1])
ret &= ~0x20;
}
return ret;
}
static uint8_t
joystick_standard_read_3button(UNUSED(void *priv))
{
@@ -119,7 +135,7 @@ joystick_standard_read_3button(UNUSED(void *priv))
return ret;
}
static uint8_t
uint8_t
joystick_standard_read_4button(UNUSED(void *priv))
{
uint8_t gp = 0;
@@ -139,7 +155,7 @@ joystick_standard_read_4button(UNUSED(void *priv))
return ret;
}
static void
void
joystick_standard_write(UNUSED(void *priv))
{
//
@@ -267,15 +283,36 @@ joystick_standard_read_axis_3axis(UNUSED(void *priv), int axis)
return joystick_state[gp][0].axis[0];
case 1:
return joystick_state[gp][0].axis[1];
case 2:
case 2: // Rudder Axis
return joystick_state[gp][0].axis[2];
case 3:
case 3: // Throttle Axis
default:
return 0;
}
}
static int
int
joystick_standard_read_axis_3axis_throttle(UNUSED(void *priv), int axis)
{
uint8_t gp = 0;
if (!JOYSTICK_PRESENT(gp, 0))
return AXIS_NOT_PRESENT;
switch (axis) {
case 0:
return joystick_state[gp][0].axis[0];
case 1:
return joystick_state[gp][0].axis[1];
case 3: // Throttle Axis
return joystick_state[gp][0].axis[2];
case 2: // Rudder Axis
default:
return 0;
}
}
int
joystick_standard_read_axis_4axis(UNUSED(void *priv), int axis)
{
uint8_t gp = 0;
@@ -288,10 +325,10 @@ joystick_standard_read_axis_4axis(UNUSED(void *priv), int axis)
return joystick_state[gp][0].axis[0];
case 1:
return joystick_state[gp][0].axis[1];
case 2:
return joystick_state[gp][0].axis[2];
case 3:
case 2: // Rudder Axis
return joystick_state[gp][0].axis[3];
case 3: // Throttle Axis
return joystick_state[gp][0].axis[2];
default:
return 0;
}
@@ -348,7 +385,7 @@ joystick_standard_read_axis_8button(UNUSED(void *priv), int axis)
}
}
static void
void
joystick_standard_a0_over(UNUSED(void *priv))
{
//
@@ -485,9 +522,9 @@ const joystick_t joystick_3axis_2button = {
.internal_name = "3axis_2button",
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = joystick_standard_read,
.read = joystick_standard_read_2button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_3axis,
.read_axis = joystick_standard_read_axis_3axis_throttle,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 2,
@@ -505,7 +542,7 @@ const joystick_t joystick_3axis_3button = {
.close = joystick_standard_close,
.read = joystick_standard_read_3button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_3axis,
.read_axis = joystick_standard_read_axis_3axis_throttle,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 3,
@@ -523,7 +560,7 @@ const joystick_t joystick_3axis_4button = {
.close = joystick_standard_close,
.read = joystick_standard_read_4button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_3axis,
.read_axis = joystick_standard_read_axis_3axis_throttle,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 4,
@@ -539,12 +576,12 @@ const joystick_t joystick_4axis_2button = {
.internal_name = "4axis_2button",
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = joystick_standard_read,
.read = joystick_standard_read_2button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_4axis,
.a0_over = joystick_standard_a0_over,
.axis_count = 4,
.button_count = 3,
.button_count = 2,
.pov_count = 0,
.max_joysticks = 1,
.axis_names = { "X axis", "Y axis", "Z axis", "zX axis" },
@@ -738,9 +775,9 @@ const joystick_t joystick_2button_yoke_throttle = {
.internal_name = "2button_yoke_throttle",
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = joystick_standard_read,
.read = joystick_standard_read_2button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_3axis,
.read_axis = joystick_standard_read_axis_3axis_throttle,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 2,
@@ -758,14 +795,14 @@ const joystick_t joystick_3button_yoke_throttle = {
.close = joystick_standard_close,
.read = joystick_standard_read_3button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_3axis,
.read_axis = joystick_standard_read_axis_3axis_throttle,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 3,
.pov_count = 0,
.max_joysticks = 1,
.axis_names = { "Roll axis", "Pitch axis", "Throttle axis" },
.button_names = { "Button 1", "Button 2", "Button 3" },
.button_names = { "Trigger", "Button 2", "Button 3" },
.pov_names = { NULL }
};
@@ -776,14 +813,14 @@ const joystick_t joystick_4button_yoke_throttle = {
.close = joystick_standard_close,
.read = joystick_standard_read_4button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_3axis,
.read_axis = joystick_standard_read_axis_3axis_throttle,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 4,
.pov_count = 0,
.max_joysticks = 1,
.axis_names = { "Roll axis", "Pitch axis", "Throttle axis" },
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4" },
.button_names = { "Trigger", "Button 2", "Button 3", "Button 4" },
.pov_names = { NULL }
};
@@ -792,12 +829,12 @@ const joystick_t joystick_steering_wheel_2_button = {
.internal_name = "steering_wheel_2_button",
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = joystick_standard_read,
.read = joystick_standard_read_2button,
.write = joystick_standard_write,
.read_axis = joystick_standard_read_axis_3axis,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 4,
.button_count = 2,
.pov_count = 0,
.max_joysticks = 1,
.axis_names = { "Steering axis", "Accelerator axis", "Brake axis" },
@@ -815,7 +852,7 @@ const joystick_t joystick_steering_wheel_3_button = {
.read_axis = joystick_standard_read_axis_3axis,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 4,
.button_count = 3,
.pov_count = 0,
.max_joysticks = 1,
.axis_names = { "Steering axis", "Accelerator axis", "Brake axis" },

View File

@@ -44,44 +44,7 @@
#include <86box/timer.h>
#include <86box/gameport.h>
#include <86box/plat_unused.h>
static void *
tm_fcs_init(void)
{
return NULL;
}
static void
tm_fcs_close(UNUSED(void *priv))
{
//
}
static uint8_t
tm_fcs_read(UNUSED(void *priv))
{
uint8_t gp = 0;
uint8_t ret = 0xf0;
if (JOYSTICK_PRESENT(gp, 0)) {
if (joystick_state[gp][0].button[0])
ret &= ~0x10;
if (joystick_state[gp][0].button[1])
ret &= ~0x20;
if (joystick_state[gp][0].button[2])
ret &= ~0x40;
if (joystick_state[gp][0].button[3])
ret &= ~0x80;
}
return ret;
}
static void
tm_fcs_write(UNUSED(void *priv))
{
//
}
#include <86box/joystick.h>
static int
tm_fcs_read_axis(UNUSED(void *priv), int axis)
@@ -96,8 +59,6 @@ tm_fcs_read_axis(UNUSED(void *priv), int axis)
return joystick_state[gp][0].axis[0];
case 1:
return joystick_state[gp][0].axis[1];
case 2:
return 0;
case 3:
if (joystick_state[gp][0].pov[0] == -1)
return 32767;
@@ -110,6 +71,7 @@ tm_fcs_read_axis(UNUSED(void *priv), int axis)
if (joystick_state[gp][0].pov[0] >= 225 && joystick_state[gp][0].pov[0] < 315)
return 16384;
return 0;
case 2:
default:
return 0;
}
@@ -147,44 +109,38 @@ tm_fcs_rcs_read_axis(UNUSED(void *priv), int axis)
}
}
static void
tm_fcs_a0_over(UNUSED(void *priv))
{
//
}
const joystick_t joystick_tm_fcs = {
.name = "Thrustmaster Flight Control System",
.internal_name = "thrustmaster_fcs",
.init = tm_fcs_init,
.close = tm_fcs_close,
.read = tm_fcs_read,
.write = tm_fcs_write,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = joystick_standard_read_4button,
.write = joystick_standard_write,
.read_axis = tm_fcs_read_axis,
.a0_over = tm_fcs_a0_over,
.a0_over = joystick_standard_a0_over,
.axis_count = 2,
.button_count = 4,
.pov_count = 1,
.max_joysticks = 1,
.axis_names = { "X axis", "Y axis" },
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4" },
.button_names = { "Trigger", "Button 2", "Button 3", "Button 4" },
.pov_names = { "POV" }
};
const joystick_t joystick_tm_fcs_rcs = {
.name = "Thrustmaster FCS + Rudder Control System",
.internal_name = "thrustmaster_fcs_rcs",
.init = tm_fcs_init,
.close = tm_fcs_close,
.read = tm_fcs_read,
.write = tm_fcs_write,
.init = joystick_standard_init,
.close = joystick_standard_close,
.read = joystick_standard_read_4button,
.write = joystick_standard_write,
.read_axis = tm_fcs_rcs_read_axis,
.a0_over = tm_fcs_a0_over,
.a0_over = joystick_standard_a0_over,
.axis_count = 3,
.button_count = 4,
.pov_count = 1,
.max_joysticks = 1,
.axis_names = { "X axis", "Y axis", "Rudder" },
.button_names = { "Button 1", "Button 2", "Button 3", "Button 4" },
.button_names = { "Trigger", "Button 2", "Button 3", "Button 4" },
.pov_names = { "POV" }
};

View File

@@ -183,7 +183,7 @@ extern const joystick_t joystick_2axis_4button;
extern const joystick_t joystick_2axis_6button;
extern const joystick_t joystick_2axis_8button;
// 2 axis Generic Joysticks
// 3 axis Generic Joysticks
extern const joystick_t joystick_3axis_2button;
extern const joystick_t joystick_3axis_3button;
extern const joystick_t joystick_3axis_4button;

View File

@@ -0,0 +1,27 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Definitions for the analog joystick handlers.
*
* Authors: Jasmine Iwanek, <jriwanek@gmail.com>
*
* Copyright 2025 Jasmine Iwanek.
*/
#ifndef EMU_JOYSTICK_H
#define EMU_JOYSTICK_H
void *joystick_standard_init(void);
void joystick_standard_close(UNUSED(void *priv));
uint8_t joystick_standard_read_2button(UNUSED(void *priv));
uint8_t joystick_standard_read_4button(UNUSED(void *priv));
void joystick_standard_write(UNUSED(void *priv));
int joystick_standard_read_axis_3axis_throttle(UNUSED(void *priv), int axis);
int joystick_standard_read_axis_4axis(UNUSED(void *priv), int axis);
void joystick_standard_a0_over(UNUSED(void *priv));
#endif /*EMU_JOYSTICK_H*/

View File

@@ -66,6 +66,11 @@ typedef struct pcjr_s {
int serial_pos;
uint8_t pa;
uint8_t pb;
uint8_t option_modem;
uint8_t option_fdc;
uint8_t option_ir;
pc_timer_t send_delay_timer;
} pcjr_t;

View File

@@ -1062,6 +1062,9 @@ extern int machine_at_8500tvxa_init(const machine_t *);
extern int machine_at_presario2240_init(const machine_t *);
extern int machine_at_presario4500_init(const machine_t *);
extern int machine_at_dellhannibalp_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t p5vxb_device;
#endif
extern int machine_at_p5vxb_init(const machine_t *);
extern int machine_at_p55va_init(const machine_t *);
extern int machine_at_gw2kte_init(const machine_t *);

View File

@@ -20,14 +20,15 @@
#ifndef EMU_SERIAL_H
#define EMU_SERIAL_H
#define SERIAL_8250 0
#define SERIAL_8250_PCJR 1
#define SERIAL_16450 2
#define SERIAL_16550 3
#define SERIAL_16650 4
#define SERIAL_16750 5
#define SERIAL_16850 6
#define SERIAL_16950 7
#define SERIAL_8250 0
#define SERIAL_8250_PCJR_3F8 1
#define SERIAL_8250_PCJR_2F8 2
#define SERIAL_16450 3
#define SERIAL_16550 4
#define SERIAL_16650 5
#define SERIAL_16750 6
#define SERIAL_16850 7
#define SERIAL_16950 8
#define SERIAL_FIFO_SIZE 16
@@ -151,7 +152,8 @@ extern int serial_get_ri(serial_t *dev);
extern uint8_t serial_get_shadow(serial_t *dev);
extern const device_t ns8250_device;
extern const device_t ns8250_pcjr_device;
extern const device_t ns8250_pcjr_3f8_device;
extern const device_t ns8250_pcjr_2f8_device;
extern const device_t ns16450_device;
extern const device_t ns16550_device;
extern const device_t ns16650_device;

View File

@@ -813,17 +813,72 @@ machine_at_dellhannibalp_init(const machine_t *model)
return ret;
}
static const device_config_t p5vxb_config[] = {
// clang-format off
{
.name = "bios",
.description = "BIOS Version",
.type = CONFIG_BIOS,
.default_string = "p5vxb",
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = {
{
.name = "Award Modular BIOS v4.50PG - Revision 1.0",
.internal_name = "p5vxb",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 131072,
.files = { "roms/machines/p5vxb/P5VXB10.BIN", "" }
},
{
.name = "Award Modular BIOS v4.51PG - Revision 1.5c",
.internal_name = "p5vxb_451pg",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 131072,
.files = { "roms/machines/p5vxb/P5VXB15C.BIN", "" }
},
{ .files_no = 0 }
}
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
const device_t p5vxb_device = {
.name = "ECS P5VX-B",
.internal_name = "p5vxb_device",
.flags = 0,
.local = 0,
.init = NULL,
.close = NULL,
.reset = NULL,
.available = NULL,
.speed_changed = NULL,
.force_redraw = NULL,
.config = p5vxb_config
};
int
machine_at_p5vxb_init(const machine_t *model)
{
int ret;
int ret = 0;
const char *fn;
ret = bios_load_linear("roms/machines/p5vxb/P5VXB10.BIN",
0x000e0000, 131072, 0);
if (bios_only || !ret)
/* No ROMs available */
if (!device_available(model->device))
return ret;
device_context(model->device);
fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0);
ret = bios_load_linear(fn, 0x000e0000, 131072, 0);
device_context_restore();
machine_at_common_init(model);
pci_init(PCI_CONFIG_TYPE_1);

View File

@@ -280,8 +280,8 @@ machine_at_vectra500mt_init(const machine_t *model)
if (bios_only || !ret)
return ret;
machine_at_common_init_ex(model, 2);
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);

View File

@@ -41,6 +41,7 @@
#include <86box/rom.h>
#include <86box/fdd.h>
#include <86box/fdc.h>
#include <86box/fdc_ext.h>
#include <86box/sound.h>
#include <86box/snd_speaker.h>
#include <86box/snd_sn76489.h>
@@ -652,7 +653,10 @@ kbd_read(uint16_t port, void *priv)
case 0x62:
ret = (pcjr->latched ? 1 : 0);
ret |= 0x02; /* Modem card not installed */
if (!pcjr->option_modem)
ret |= 0x02; /* Modem card not installed */
if (!pcjr->option_fdc)
ret |= 0x04; /* Diskette card not installed */
if (mem_size < 128)
ret |= 0x08; /* 64k expansion card not installed */
if ((pcjr->pb & 0x08) || (cassette == NULL))
@@ -664,6 +668,8 @@ kbd_read(uint16_t port, void *priv)
ret |= (pcjr->data ? 0x40 : 0);
if (pcjr->data)
ret |= 0x40;
if (pcjr->option_ir)
ret |= 0x80; /* Keyboard cable not connected */
break;
case 0xa0:
@@ -813,6 +819,30 @@ static const device_config_t pcjr_config[] = {
.selection = { { 0 } },
.bios = { { 0 } }
},
#if 0
{
.name = "modem_slot",
.description = "Enable Serial Port in Modem Slot",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
{
.name = "ir_reciever",
.description = "Enable IR Reciever",
.type = CONFIG_BINARY,
.default_string = NULL,
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.selection = { { 0 } },
.bios = { { 0 } }
},
#endif
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
@@ -846,6 +876,18 @@ machine_pcjr_init(UNUSED(const machine_t *model))
pcjr = calloc(1, sizeof(pcjr_t));
#if 0
pcjr->option_modem = device_get_config_int("modem_slot");
#else
pcjr->option_modem = 0;
#endif
pcjr->option_fdc = 0;
#if 0
pcjr->option_ir = device_get_config_int("ir_reciever");
#else
pcjr->option_ir = 0;
#endif
is_pcjr = 1;
pic_init_pcjr();
@@ -865,9 +907,13 @@ machine_pcjr_init(UNUSED(const machine_t *model))
keyboard_scan = 1;
key_queue_start = key_queue_end = 0;
io_sethandler(0x0060, 4,
kbd_read, NULL, NULL, kbd_write, NULL, NULL, pcjr);
kbd_read, NULL, NULL,
kbd_write, NULL, NULL,
pcjr);
io_sethandler(0x00a0, 8,
kbd_read, NULL, NULL, kbd_write, NULL, NULL, pcjr);
kbd_read, NULL, NULL,
kbd_write, NULL, NULL,
pcjr);
timer_add(&pcjr->send_delay_timer, kbd_poll, pcjr, 1);
keyboard_set_table(scancode_pcjr);
keyboard_send = kbd_adddata_ex;
@@ -877,9 +923,18 @@ machine_pcjr_init(UNUSED(const machine_t *model))
nmi_mask = 0x80;
device_add(&fdc_pcjr_device);
if (fdc_current[0] == FDC_INTERNAL) {
device_add(&fdc_pcjr_device);
pcjr->option_fdc = 1;
}
if (!pcjr->option_modem)
device_add(&ns8250_pcjr_2f8_device);
else {
device_add(&ns8250_pcjr_3f8_device);
device_add(&ns8250_pcjr_2f8_device);
}
device_add(&ns8250_pcjr_device);
/* So that serial_standalone_init() won't do anything. */
serial_set_next_inst(SERIAL_MAX - 1);

View File

@@ -300,7 +300,7 @@ const machine_t machines[] = {
.max_multi = 0
},
.bus_flags = MACHINE_PCJR,
.flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_CARTRIDGE,
.flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_CARTRIDGE | MACHINE_FDC,
.ram = {
.min = 64,
.max = 640,
@@ -316,7 +316,7 @@ const machine_t machines[] = {
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.fdc_device = &fdc_pcjr_device,
.sio_device = NULL,
.vid_device = &pcjr_device,
.snd_device = NULL,
@@ -8831,7 +8831,7 @@ const machine_t machines[] = {
.max_multi = 0
},
.bus_flags = MACHINE_VLB,
.flags = MACHINE_APM | MACHINE_ACPI,
.flags = MACHINE_APM,
.ram = {
.min = 1024,
.max = 131072,
@@ -12432,47 +12432,47 @@ const machine_t machines[] = {
.net_device = NULL
},
{
.name = "[i430FX] IBM PC 3x0 (type 65x6) (Morrison64)",
.internal_name = "pc330_65x6",
.type = MACHINE_TYPE_SOCKET5,
.chipset = MACHINE_CHIPSET_INTEL_430FX,
.init = machine_at_pc330_65x6_init,
.p1_handler = machine_generic_p1_handler,
.gpio_handler = NULL,
.available_flag = MACHINE_AVAILABLE,
.name = "[i430FX] IBM PC 3x0 (type 65x6) (Morrison64)",
.internal_name = "pc330_65x6",
.type = MACHINE_TYPE_SOCKET5,
.chipset = MACHINE_CHIPSET_INTEL_430FX,
.init = machine_at_pc330_65x6_init,
.p1_handler = machine_generic_p1_handler,
.gpio_handler = NULL,
.available_flag = MACHINE_AVAILABLE,
.gpio_acpi_handler = NULL,
.cpu = {
.package = CPU_PKG_SOCKET5_7,
.block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86),
.min_bus = 50000000,
.max_bus = 66666667,
.cpu = {
.package = CPU_PKG_SOCKET5_7,
.block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86),
.min_bus = 50000000,
.max_bus = 66666667,
.min_voltage = 3380,
.max_voltage = 3520,
.min_multi = 1.5,
.max_multi = 2.0
.min_multi = 1.5,
.max_multi = 2.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM,
.ram = {
.min = 8192,
.max = 131072,
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM,
.ram = {
.min = 8192,
.max = 131072,
.step = 8192
},
.nvrmask = 255,
.jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3,
.nvrmask = 255,
.jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3,
.default_jumpered_ecp_dma = 3,
.kbc_device = NULL,
.kbc_params = 0x00000000,
.kbc_p1 = 0x000044f0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &s3_phoenix_trio64_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
.kbc_device = NULL,
.kbc_params = 0x00000000,
.kbc_p1 = 0x000044f0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &s3_phoenix_trio64_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
},
/* According to tests from real hardware: This has AMI MegaKey KBC firmware on the
PC87306 Super I/O chip, command 0xA1 returns '5'.
@@ -13040,27 +13040,27 @@ const machine_t machines[] = {
.max_multi = 2.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO,
.ram = {
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO,
.ram = {
.min = 4096,
.max = 131072,
.step = 4096
},
.nvrmask = 127,
.jumpered_ecp_dma = MACHINE_DMA_USE_CONFIG,
.nvrmask = 127,
.jumpered_ecp_dma = MACHINE_DMA_USE_CONFIG,
.default_jumpered_ecp_dma = -1,
.kbc_device = &kbc_at_device,
.kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess */
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &gd5434_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
.kbc_device = &kbc_at_device,
.kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess */
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &gd5434_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
},
/* Has a VIA KBC chip */
{
@@ -13084,27 +13084,27 @@ const machine_t machines[] = {
.max_multi = 2.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_APM,
.ram = {
.flags = MACHINE_IDE_DUAL | MACHINE_APM,
.ram = {
.min = 4096,
.max = 262144,
.step = 4096
},
.nvrmask = 127,
.jumpered_ecp_dma = MACHINE_DMA_1 | MACHINE_DMA_3,
.nvrmask = 127,
.jumpered_ecp_dma = MACHINE_DMA_1 | MACHINE_DMA_3,
.default_jumpered_ecp_dma = 1,
.kbc_device = &kbc_at_device,
.kbc_params = KBC_VEN_VIA | 0x00424600, /* Guess */
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
.kbc_device = &kbc_at_device,
.kbc_params = KBC_VEN_VIA | 0x00424600, /* Guess */
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
},
/* KBC firmware is unknown. No commands outside of the base PS/2 */
/* KBC command set are used. */
@@ -13129,27 +13129,27 @@ const machine_t machines[] = {
.max_multi = 2.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_APM,
.ram = {
.flags = MACHINE_IDE_DUAL | MACHINE_APM,
.ram = {
.min = 4096,
.max = 131072,
.step = 4096
},
.nvrmask = 127,
.jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3,
.nvrmask = 127,
.jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3,
.default_jumpered_ecp_dma = 4,
.kbc_device = &kbc_at_device,
.kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess */
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
.kbc_device = &kbc_at_device,
.kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess */
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
},
/* This has Phoenix KBC firmware. */
{
@@ -13173,27 +13173,27 @@ const machine_t machines[] = {
.max_multi = 2.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO,
.ram = {
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO,
.ram = {
.min = 8192,
.max = 139264,
.step = 4096
},
.nvrmask = 127,
.jumpered_ecp_dma = MACHINE_DMA_1 | MACHINE_DMA_3,
.nvrmask = 127,
.jumpered_ecp_dma = MACHINE_DMA_1 | MACHINE_DMA_3,
.default_jumpered_ecp_dma = 3,
.kbc_device = &kbc_at_device,
.kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess */
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &gd5430_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
.kbc_device = &kbc_at_device,
.kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess */
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &gd5430_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
},
/* VLSI Wildcat */
@@ -13219,27 +13219,27 @@ const machine_t machines[] = {
.max_multi = 2.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO,
.ram = {
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO,
.ram = {
.min = 4096,
.max = 196608,
.step = 4096
},
.nvrmask = 127,
.jumpered_ecp_dma = MACHINE_DMA_3,
.nvrmask = 127,
.jumpered_ecp_dma = MACHINE_DMA_3,
.default_jumpered_ecp_dma = 3,
.kbc_device = &kbc_at_device,
.kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess */
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &s3_phoenix_trio64_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
.kbc_device = &kbc_at_device,
.kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess */
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &s3_phoenix_trio64_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
},
/* Socket 7 (Single Voltage) machines */
@@ -13334,90 +13334,90 @@ const machine_t machines[] = {
.net_device = NULL
},
{
.name = "[i430FX] HP Vectra VE 5/XXX Series 2",
.internal_name = "hpvectravexxx",
.type = MACHINE_TYPE_SOCKET7_3V,
.chipset = MACHINE_CHIPSET_INTEL_430FX,
.init = machine_at_hpvectravexxx_init,
.p1_handler = machine_generic_p1_handler,
.gpio_handler = NULL,
.available_flag = MACHINE_AVAILABLE,
.name = "[i430FX] HP Vectra VE 5/XXX Series 2",
.internal_name = "hpvectravexxx",
.type = MACHINE_TYPE_SOCKET7_3V,
.chipset = MACHINE_CHIPSET_INTEL_430FX,
.init = machine_at_hpvectravexxx_init,
.p1_handler = machine_generic_p1_handler,
.gpio_handler = NULL,
.available_flag = MACHINE_AVAILABLE,
.gpio_acpi_handler = NULL,
.cpu = {
.package = CPU_PKG_SOCKET5_7,
.block = CPU_BLOCK_NONE,
.min_bus = 50000000,
.max_bus = 66666667,
.cpu = {
.package = CPU_PKG_SOCKET5_7,
.block = CPU_BLOCK_NONE,
.min_bus = 50000000,
.max_bus = 66666667,
.min_voltage = 3380,
.max_voltage = 3520,
.min_multi = 1.5,
.max_multi = 3.0
.min_multi = 1.5,
.max_multi = 3.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM,
.ram = {
.min = 8192,
.max = 131072,
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM,
.ram = {
.min = 8192,
.max = 131072,
.step = 8192
},
.nvrmask = 255,
.jumpered_ecp_dma = 0,
.nvrmask = 255,
.jumpered_ecp_dma = 0,
.default_jumpered_ecp_dma = -1,
.kbc_device = NULL,
.kbc_params = 0x00000000,
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = &hpvectravexxx_device,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &gd5436_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
.kbc_device = NULL,
.kbc_params = 0x00000000,
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = &hpvectravexxx_device,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &gd5436_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
},
{
.name = "[i430FX] HP Vectra 500 Series xxx/MT",
.internal_name = "vectra500mt",
.type = MACHINE_TYPE_SOCKET7_3V,
.chipset = MACHINE_CHIPSET_INTEL_430FX,
.init = machine_at_vectra500mt_init,
.p1_handler = machine_generic_p1_handler,
.gpio_handler = NULL,
.available_flag = MACHINE_AVAILABLE,
.name = "[i430FX] HP Vectra 500 Series xxx/MT",
.internal_name = "vectra500mt",
.type = MACHINE_TYPE_SOCKET7_3V,
.chipset = MACHINE_CHIPSET_INTEL_430FX,
.init = machine_at_vectra500mt_init,
.p1_handler = machine_generic_p1_handler,
.gpio_handler = NULL,
.available_flag = MACHINE_AVAILABLE,
.gpio_acpi_handler = NULL,
.cpu = {
.package = CPU_PKG_SOCKET5_7,
.block = CPU_BLOCK_NONE,
.min_bus = 50000000,
.max_bus = 66666667,
.cpu = {
.package = CPU_PKG_SOCKET5_7,
.block = CPU_BLOCK_NONE,
.min_bus = 50000000,
.max_bus = 66666667,
.min_voltage = 3380,
.max_voltage = 3520,
.min_multi = 1.5,
.max_multi = 3.0
.min_multi = 1.5,
.max_multi = 3.0
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM,
.ram = {
.min = 8192,
.max = 131072,
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM,
.ram = {
.min = 8192,
.max = 131072,
.step = 8192
},
.nvrmask = 511,
.jumpered_ecp_dma = 0,
.nvrmask = 511,
.jumpered_ecp_dma = 0,
.default_jumpered_ecp_dma = -1,
.kbc_device = NULL,
.kbc_params = 0x00000000,
.kbc_p1 = 0x000044f0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &s3_phoenix_trio64_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
.kbc_device = NULL,
.kbc_params = 0x00000000,
.kbc_p1 = 0x000044f0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = &s3_phoenix_trio64_onboard_pci_device,
.snd_device = NULL,
.net_device = NULL
},
/* Has a SM(S)C FDC37C932 Super I/O chip with on-chip KBC with AMI
MegaKey (revision '5') KBC firmware. */
@@ -15218,7 +15218,7 @@ const machine_t machines[] = {
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.device = &p5vxb_device,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
@@ -15778,48 +15778,48 @@ const machine_t machines[] = {
},
/* This has the Phoenix MultiKey KBC firmware on the NSC Super I/O chip. */
{
.name = "[i430TX] Intel AN430TX (Anchorage)",
.internal_name = "an430tx",
.type = MACHINE_TYPE_SOCKET7,
.chipset = MACHINE_CHIPSET_INTEL_430TX,
.init = machine_at_an430tx_init,
.p1_handler = machine_generic_p1_handler,
.name = "[i430TX] Intel AN430TX (Anchorage)",
.internal_name = "an430tx",
.type = MACHINE_TYPE_SOCKET7,
.chipset = MACHINE_CHIPSET_INTEL_430TX,
.init = machine_at_an430tx_init,
.p1_handler = machine_generic_p1_handler,
.gpio_handler = machine_ap440fx_vs440fx_gpio_handler,
.available_flag = MACHINE_AVAILABLE,
.available_flag = MACHINE_AVAILABLE,
.gpio_acpi_handler = NULL,
.cpu = {
.package = CPU_PKG_SOCKET5_7,
.block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P,
CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L),
.min_bus = 60000000,
.max_bus = 66666667,
.cpu = {
.package = CPU_PKG_SOCKET5_7,
.block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P,
CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L),
.min_bus = 60000000,
.max_bus = 66666667,
.min_voltage = 2800,
.max_voltage = 3520,
.min_multi = 1.5,
.max_multi = 3.5
.min_multi = 1.5,
.max_multi = 3.5
},
.bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_SOUND | MACHINE_GAMEPORT, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */
.ram = {
.min = 8192,
.max = 262144,
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_SOUND | MACHINE_GAMEPORT, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */
.ram = {
.min = 8192,
.max = 262144,
.step = 8192
},
.nvrmask = 255,
.jumpered_ecp_dma = 0,
.nvrmask = 255,
.jumpered_ecp_dma = 0,
.default_jumpered_ecp_dma = -1,
.kbc_device = NULL,
.kbc_params = 0x00000000,
.kbc_p1 = 0x000044f0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = &an430tx_device,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.snd_device = &ymf715_onboard_device,
.net_device = NULL
.kbc_device = NULL,
.kbc_params = 0x00000000,
.kbc_p1 = 0x000044f0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = &an430tx_device,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.snd_device = &ymf715_onboard_device,
.net_device = NULL
},
/* This has the Winbond W83977 Super I/O Chip with AMIKey-2 KBC firmware, which is type 'H'. */
{

View File

@@ -603,9 +603,6 @@ msgstr ""
msgid "ID:"
msgstr ""
msgid "&Specify..."
msgstr ""
msgid "Sectors:"
msgstr ""
@@ -3063,9 +3060,6 @@ msgstr ""
msgid "Color scheme"
msgstr ""
msgid "System"
msgstr ""
msgid "Light"
msgstr ""

View File

@@ -603,9 +603,6 @@ msgstr "Kanál:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Zadat..."
msgid "Sectors:"
msgstr "Sektory:"
@@ -1789,7 +1786,7 @@ msgid "Remove"
msgstr "Odstranit"
msgid "Browse..."
msgstr "Browse..."
msgstr "Procházet..."
msgid "Couldn't create OpenGL context."
msgstr "Nepodařilo se vytvořit kontext OpenGL."
@@ -3063,9 +3060,6 @@ msgstr "Režim roztažení vstupu OpenGL"
msgid "Color scheme"
msgstr "Barevné schéma"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Světlé"

View File

@@ -603,9 +603,6 @@ msgstr "Kanal:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Festlegen..."
msgid "Sectors:"
msgstr "Sektoren:"
@@ -3063,9 +3060,6 @@ msgstr "Eingabestreckungsmodus von OpenGL"
msgid "Color scheme"
msgstr "Farbschema"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Licht"

View File

@@ -603,9 +603,6 @@ msgstr "Canal:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "E&specificar..."
msgid "Sectors:"
msgstr "Sectores:"
@@ -894,7 +891,7 @@ msgstr "Mando de 4 ejes, 4 botones"
msgid "2-button gamepad(s)"
msgstr "Mando(s) de juegos de 2 botones"
msgid "4-button gamepad"
msgid "3-button gamepad"
msgstr "Mando de juegos de 3 botones"
msgid "4-button gamepad"
@@ -3063,9 +3060,6 @@ msgstr "Modo de estiramiento de entrada de OpenGL"
msgid "Color scheme"
msgstr "Esquema de colores"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Luz"

View File

@@ -603,9 +603,6 @@ msgstr "Kanava:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Määritä..."
msgid "Sectors:"
msgstr "Sektorit:"
@@ -3063,9 +3060,6 @@ msgstr "OpenGL-syötteen venytystila"
msgid "Color scheme"
msgstr "Väriteema"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Vaalea"

View File

@@ -603,9 +603,6 @@ msgstr "Canal:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Spécifier..."
msgid "Sectors:"
msgstr "Secteurs:"
@@ -3063,9 +3060,6 @@ msgstr "Mode d'étirement des données d'entrée d'OpenGL"
msgid "Color scheme"
msgstr "Palette de couleurs"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Lumière"

View File

@@ -603,9 +603,6 @@ msgstr "Kanal:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Odredi..."
msgid "Sectors:"
msgstr "Sektori:"
@@ -1789,7 +1786,7 @@ msgid "Remove"
msgstr "Ukloni"
msgid "Browse..."
msgstr "Pregledajte..."
msgstr "Pretraži..."
msgid "Couldn't create OpenGL context."
msgstr "Nije moguće stvoriti kontekst OpenGL."
@@ -3063,9 +3060,6 @@ msgstr "Način rastezanja ulaza u OpenGL-u"
msgid "Color scheme"
msgstr "Shema boja"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Svjetlo"

View File

@@ -603,9 +603,6 @@ msgstr "Canale:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Specifica..."
msgid "Sectors:"
msgstr "Settori:"
@@ -3063,9 +3060,6 @@ msgstr "Modalità adattamento ingresso OpenGL"
msgid "Color scheme"
msgstr "Modalità colori"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Chiara"

View File

@@ -603,9 +603,6 @@ msgstr "チャンネル:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "参照(&S)..."
msgid "Sectors:"
msgstr "セクター:"
@@ -1789,7 +1786,7 @@ msgid "Remove"
msgstr "削除"
msgid "Browse..."
msgstr "ブラウズ..."
msgstr "参照..."
msgid "Couldn't create OpenGL context."
msgstr "OpenGLコンテキストを作成できませんでした。"
@@ -3063,9 +3060,6 @@ msgstr "OpenGLの入力ストレッチモード"
msgid "Color scheme"
msgstr "配色"
msgid "System"
msgstr ""
msgid "Light"
msgstr "光"

View File

@@ -603,9 +603,6 @@ msgstr "채널:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "열기(&S)..."
msgid "Sectors:"
msgstr "섹터:"
@@ -3063,9 +3060,6 @@ msgstr "OpenGL 입력 스트레치 모드"
msgid "Color scheme"
msgstr "색상 구성"
msgid "System"
msgstr ""
msgid "Light"
msgstr "빛"

View File

@@ -603,9 +603,6 @@ msgstr "Kanal:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Angi..."
msgid "Sectors:"
msgstr "Sektorer:"
@@ -3063,9 +3060,6 @@ msgstr "Inngangsstrekkmodus for OpenGL"
msgid "Color scheme"
msgstr "Fargevalg"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Lys"

View File

@@ -603,9 +603,6 @@ msgstr "Kanaal:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Specificeer..."
msgid "Sectors:"
msgstr "Sectoren:"
@@ -3063,9 +3060,6 @@ msgstr "Input stretch-modus van OpenGL"
msgid "Color scheme"
msgstr "Kleurenschema"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Licht"

View File

@@ -603,9 +603,6 @@ msgstr "Kanał:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Określ..."
msgid "Sectors:"
msgstr "Sektory:"
@@ -3063,9 +3060,6 @@ msgstr "Tryb rozciągania wejściowego OpenGL"
msgid "Color scheme"
msgstr "Schemat kolorów"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Światło"

View File

@@ -603,9 +603,6 @@ msgstr "Canal:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Especificar..."
msgid "Sectors:"
msgstr "Setores:"
@@ -3063,9 +3060,6 @@ msgstr "Modo de expansão de entrada do OpenGL"
msgid "Color scheme"
msgstr "Esquema de cores"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Claro"

View File

@@ -603,9 +603,6 @@ msgstr "Canal:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Especificar..."
msgid "Sectors:"
msgstr "Sectores:"
@@ -3063,9 +3060,6 @@ msgstr "Modo de expansão de entrada do OpenGL"
msgid "Color scheme"
msgstr "Esquema de cores"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Claro"

View File

@@ -603,9 +603,6 @@ msgstr "Канал:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Указать..."
msgid "Sectors:"
msgstr "Секторы:"
@@ -3063,9 +3060,6 @@ msgstr "Режим растяжения ввода OpenGL"
msgid "Color scheme"
msgstr "Цветовая схема"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Светлая"

View File

@@ -603,9 +603,6 @@ msgstr "Kanál:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Zadať..."
msgid "Sectors:"
msgstr "Sektory:"
@@ -3063,9 +3060,6 @@ msgstr "Režim rozťahovania vstupu OpenGL"
msgid "Color scheme"
msgstr "Farebná schéma"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Svetlo"

View File

@@ -603,9 +603,6 @@ msgstr "Kanal:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Določi..."
msgid "Sectors:"
msgstr "Sektorji:"
@@ -3063,9 +3060,6 @@ msgstr "Način raztezanja vhoda OpenGL"
msgid "Color scheme"
msgstr "Barvna shema"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Svetloba"

View File

@@ -603,9 +603,6 @@ msgstr "Kanal:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Specificera..."
msgid "Sectors:"
msgstr "Sektorer:"
@@ -3063,9 +3060,6 @@ msgstr "Inmatningssträckningsläge för OpenGL"
msgid "Color scheme"
msgstr "Färgschema"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Ljus"

View File

@@ -603,9 +603,6 @@ msgstr "Kanal:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Belirle..."
msgid "Sectors:"
msgstr "Sektörler:"
@@ -3063,9 +3060,6 @@ msgstr "OpenGL'nin giriş germe modu"
msgid "Color scheme"
msgstr "Renk şeması"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Işık"

View File

@@ -603,9 +603,6 @@ msgstr "Канал:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "&Вказати..."
msgid "Sectors:"
msgstr "Сектора:"
@@ -1789,7 +1786,7 @@ msgid "Remove"
msgstr "Видалити"
msgid "Browse..."
msgstr "Переглянути..."
msgstr "Огляд..."
msgid "Couldn't create OpenGL context."
msgstr "Не вдалося створити контекст OpenGL."
@@ -3063,9 +3060,6 @@ msgstr "Режим розтягування вхідних даних OpenGL"
msgid "Color scheme"
msgstr "Колірна гамма"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Світло"

View File

@@ -603,9 +603,6 @@ msgstr "Kênh:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "Chỉ &rõ..."
msgid "Sectors:"
msgstr "Sector:"
@@ -3063,9 +3060,6 @@ msgstr "Chế độ kéo giãn đầu vào của OpenGL"
msgid "Color scheme"
msgstr "Bảng màu"
msgid "System"
msgstr ""
msgid "Light"
msgstr "Ánh sáng"

View File

@@ -603,9 +603,6 @@ msgstr "通道:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "指定(&S)..."
msgid "Sectors:"
msgstr "扇区(S):"
@@ -3063,9 +3060,6 @@ msgstr "OpenGL的输入拉伸模式"
msgid "Color scheme"
msgstr "配色方案"
msgid "System"
msgstr ""
msgid "Light"
msgstr "亮色"

View File

@@ -603,9 +603,6 @@ msgstr "通道:"
msgid "ID:"
msgstr "ID:"
msgid "&Specify..."
msgstr "指定(&S)..."
msgid "Sectors:"
msgstr "磁區(S):"
@@ -3063,9 +3060,6 @@ msgstr "OpenGL 的輸入拉伸模式"
msgid "Color scheme"
msgstr "配色方案"
msgid "System"
msgstr ""
msgid "Light"
msgstr "亮色"

View File

@@ -15,84 +15,15 @@
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
<enum>QLayout::SetFixedSize</enum>
</property>
<item row="2" column="2">
<widget class="QSlider" name="horizontalSliderBrightness">
<property name="minimum">
<number>-100</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QSlider" name="horizontalSliderSaturation">
<property name="maximum">
<number>360</number>
</property>
<property name="value">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label">
<widget class="QLabel" name="labelHue">
<property name="text">
<string>Hue</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QSlider" name="horizontalSliderSharpness">
<property name="minimum">
<number>-50</number>
</property>
<property name="maximum">
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok|QDialogButtonBox::StandardButton::Reset</set>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QSlider" name="horizontalSliderContrast">
<property name="maximum">
<number>360</number>
</property>
<property name="value">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Contrast</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QSlider" name="horizontalSliderHue">
<property name="minimum">
@@ -102,31 +33,100 @@
<number>360</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Sharpness</string>
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="labelSaturation">
<property name="text">
<string>Saturation</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QSlider" name="horizontalSliderSaturation">
<property name="maximum">
<number>360</number>
</property>
<property name="value">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="labelBrightness">
<property name="text">
<string>Brightness</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QSlider" name="horizontalSliderBrightness">
<property name="minimum">
<number>-100</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelContrast">
<property name="text">
<string>Contrast</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QSlider" name="horizontalSliderContrast">
<property name="maximum">
<number>360</number>
</property>
<property name="value">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="labelSharpness">
<property name="text">
<string>Sharpness</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QSlider" name="horizontalSliderSharpness">
<property name="minimum">
<number>-50</number>
</property>
<property name="maximum">
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>

View File

@@ -51,7 +51,7 @@
</sizepolicy>
</property>
<property name="text">
<string>&amp;Specify...</string>
<string>Browse...</string>
</property>
</widget>
</item>

View File

@@ -33,7 +33,7 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<widget class="QLabel" name="labelFileName">
<property name="text">
<string>File name:</string>
</property>
@@ -43,7 +43,7 @@
<widget class="FileField" name="fileField" native="true"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="labelCylinders">
<property name="text">
<string>Cylinders:</string>
</property>
@@ -66,7 +66,7 @@
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="labelHeads">
<property name="text">
<string>Heads:</string>
</property>
@@ -92,7 +92,7 @@
</widget>
</item>
<item row="1" column="4">
<widget class="QLabel" name="label_5">
<widget class="QLabel" name="labelSectors">
<property name="text">
<string>Sectors:</string>
</property>
@@ -118,7 +118,7 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="labelSize">
<property name="text">
<string>Size (MB):</string>
</property>
@@ -141,7 +141,7 @@
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_6">
<widget class="QLabel" name="labelType">
<property name="text">
<string>Type:</string>
</property>
@@ -155,7 +155,7 @@
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_8">
<widget class="QLabel" name="labelBus">
<property name="text">
<string>Bus:</string>
</property>
@@ -169,7 +169,7 @@
</widget>
</item>
<item row="3" column="4">
<widget class="QLabel" name="label_7">
<widget class="QLabel" name="labelChannel">
<property name="text">
<string>Channel:</string>
</property>
@@ -183,7 +183,7 @@
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_9">
<widget class="QLabel" name="labelSpeed">
<property name="text">
<string>Model:</string>
</property>

View File

@@ -32,7 +32,7 @@
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="label">
<property name="text">
<string>Device</string>
</property>

View File

@@ -260,7 +260,7 @@
<widget class="QStatusBar" name="statusbar"/>
<widget class="QToolBar" name="toolBar">
<property name="contextMenuPolicy">
<enum>Qt::ContextMenuPolicy::PreventContextMenu</enum>
<enum>Qt::PreventContextMenu</enum>
</property>
<property name="windowTitle">
<string notr="true">toolBar</string>
@@ -272,7 +272,7 @@
<bool>false</bool>
</property>
<property name="allowedAreas">
<set>Qt::ToolBarArea::TopToolBarArea</set>
<set>Qt::TopToolBarArea</set>
</property>
<property name="iconSize">
<size>
@@ -281,7 +281,7 @@
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonStyle::ToolButtonIconOnly</enum>
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<property name="floatable">
<bool>false</bool>
@@ -396,7 +396,7 @@
<string>E&amp;xit</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::QuitRole</enum>
<enum>QAction::QuitRole</enum>
</property>
</action>
<action name="actionSettings">
@@ -408,7 +408,7 @@
<string>&amp;Settings...</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::NoRole</enum>
<enum>QAction::NoRole</enum>
</property>
<property name="iconVisibleInMenu">
<bool>false</bool>
@@ -710,7 +710,7 @@
<bool>false</bool>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::AboutQtRole</enum>
<enum>QAction::AboutQtRole</enum>
</property>
</action>
<action name="actionAbout_86Box">
@@ -718,7 +718,7 @@
<string>&amp;About 86Box...</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::AboutRole</enum>
<enum>QAction::AboutRole</enum>
</property>
</action>
<action name="actionDocumentation">
@@ -771,7 +771,7 @@
<string>&amp;Preferences...</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::PreferencesRole</enum>
<enum>QAction::PreferencesRole</enum>
</property>
</action>
<action name="actionEnable_Discord_integration">
@@ -844,7 +844,7 @@
<string>Renderer &amp;options...</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::NoRole</enum>
<enum>QAction::NoRole</enum>
</property>
</action>
<action name="actionVulkan">

View File

@@ -27,7 +27,7 @@
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="labelFileName">
<property name="text">
<string>File name:</string>
</property>
@@ -44,7 +44,7 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<widget class="QLabel" name="labelSize">
<property name="text">
<string>Disk size:</string>
</property>

View File

@@ -42,6 +42,8 @@ extern MainWindow* main_window;
#include <QImage>
#include <cmath>
#include <cstdarg>
#define HAVE_STDARG_H
#include "qt_openglrenderer.hpp"
#include "qt_openglshadermanagerdialog.hpp"
@@ -152,7 +154,7 @@ ogl3_log(const char *fmt, ...)
if (ogl3_do_log) {
va_start(ap, fmt);
ogl3_log_ex(fmt, ap);
pclog_ex(fmt, ap);
va_end(ap);
}
}
@@ -219,10 +221,7 @@ OpenGLRenderer::compile_shader(GLenum shader_type, const char *prepend, const ch
snprintf(version, 49, "%s\n", versionRegex.match(progSource).captured(1).toLatin1().data());
progSource.remove(versionRegex);
} else {
version_loc = ((char *) this->glslVersion.toLatin1().data()) + 9;
char glsl_ver[4] = { 0 };
memcpy(glsl_ver, version_loc, 3);
int ver = atoi((char *) glsl_ver);
int ver = gl_version[0] * 100 + gl_version[1] * 10;
if (ver == 300)
ver = 130;
else if (ver == 310)
@@ -875,11 +874,11 @@ OpenGLRenderer::initialize()
glw.initializeOpenGLFunctions();
ogl3_log("OpenGL information: [%s] %s (%s)\n", glw.glGetString(GL_VENDOR), glw.glGetString(GL_RENDERER), glw.glGetString(GL_VERSION));
glsl_version[0] = glsl_version[1] = -1;
glw.glGetIntegerv(GL_MAJOR_VERSION, &glsl_version[0]);
glw.glGetIntegerv(GL_MINOR_VERSION, &glsl_version[1]);
if (glsl_version[0] < 3) {
throw opengl_init_error(tr("OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2").arg(glsl_version[0]).arg(glsl_version[1]));
gl_version[0] = gl_version[1] = -1;
glw.glGetIntegerv(GL_MAJOR_VERSION, &gl_version[0]);
glw.glGetIntegerv(GL_MINOR_VERSION, &gl_version[1]);
if (gl_version[0] < 3) {
throw opengl_init_error(tr("OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2").arg(gl_version[0]).arg(gl_version[1]));
}
ogl3_log("Using OpenGL %s\n", glw.glGetString(GL_VERSION));
ogl3_log("Using Shading Language %s\n", glw.glGetString(GL_SHADING_LANGUAGE_VERSION));

View File

@@ -102,7 +102,7 @@ private:
void *unpackBuffer = nullptr;
int glsl_version[2] = { 0, 0 };
int gl_version[2] = { 0, 0 };
void initialize();
void initializeExtensions();

View File

@@ -27,49 +27,15 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
<enum>QLayout::SetFixedSize</enum>
</property>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="labelLanguage">
<property name="text">
<string>Language:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="checkBoxMultimediaKeys">
<property name="text">
<string>Inhibit multimedia keys</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Mouse sensitivity:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>Default</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QComboBox" name="comboBoxLanguage">
<property name="maxVisibleItems">
@@ -82,10 +48,30 @@
</item>
</widget>
</item>
<item row="8" column="0">
<widget class="QCheckBox" name="checkBoxConfirmSave">
<item row="2" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="pushButtonLanguage">
<property name="text">
<string>Ask for confirmation before saving settings</string>
<string>Default</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="labelMouseSensitivity">
<property name="text">
<string>Mouse sensitivity:</string>
</property>
</widget>
</item>
@@ -107,31 +93,14 @@
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="openDirUsrPath">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Select media images from program working directory</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="pushButtonLanguage">
<property name="text">
<string>Default</string>
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="5" column="0">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -141,58 +110,106 @@
</property>
</spacer>
</item>
<item row="9" column="0">
<item row="5" column="1">
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>Default</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QCheckBox" name="openDirUsrPath">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Select media images from program working directory</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxMultimediaKeys">
<property name="text">
<string>Inhibit multimedia keys</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxConfirmSave">
<property name="text">
<string>Ask for confirmation before saving settings</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxConfirmExit">
<property name="text">
<string>Ask for confirmation before quitting</string>
</property>
</widget>
</item>
<item row="14" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
</property>
</widget>
</item>
<item row="10" column="0">
<item row="10" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxConfirmHardReset">
<property name="text">
<string>Ask for confirmation before hard resetting</string>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Color scheme</string>
<item row="11" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Color scheme</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="radioButtonSystem">
<property name="text">
<string>System</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonLight">
<property name="text">
<string>Light</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonDark">
<property name="text">
<string>Dark</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="12" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="radioButtonSystem">
<property name="text">
<string>System</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonLight">
<property name="text">
<string>Light</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonDark">
<property name="text">
<string>Dark</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>

View File

@@ -220,10 +220,12 @@ RendererCommon::eventDelegate(QEvent *event, bool &result)
case QEvent::MouseButtonPress:
case QEvent::MouseMove:
case QEvent::MouseButtonRelease:
#ifdef TOUCH_PR
case QEvent::TouchBegin:
case QEvent::TouchEnd:
case QEvent::TouchCancel:
case QEvent::TouchUpdate:
#endif
case QEvent::Wheel:
case QEvent::Enter:
case QEvent::Leave:

View File

@@ -35,7 +35,9 @@
#include <QScreen>
#include <QMessageBox>
#ifdef TOUCH_PR
#include <QTouchEvent>
#endif
#include <QStringBuilder>
#include <QPainter>
@@ -91,7 +93,9 @@ RendererStack::RendererStack(QWidget *parent, int monitor_index)
, ui(new Ui::RendererStack)
{
boxLayout->setContentsMargins(0, 0, 0, 0);
#ifdef TOUCH_PR
setAttribute(Qt::WA_AcceptTouchEvents, true);
#endif
#ifdef Q_OS_WINDOWS
setAttribute(Qt::WA_NativeWindow, true);
(void)winId();
@@ -520,12 +524,22 @@ RendererStack::event(QEvent* event)
if (m_monitor_index >= 1) {
if (mouse_input_mode >= 1) {
#ifdef TOUCH_PR
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
mouse_x_abs = (mouse_event->position().x()) / (double)width();
mouse_y_abs = (mouse_event->position().y()) / (double)height();
#else
mouse_x_abs = (mouse_event->localPos().x()) / (double)width();
mouse_y_abs = (mouse_event->localPos().y()) / (double)height();
#endif
#else
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
mouse_x_abs = (mouse_event->position().x()) / (long double)width();
mouse_y_abs = (mouse_event->position().y()) / (long double)height();
#else
mouse_x_abs = (mouse_event->localPos().x()) / (long double)width();
mouse_y_abs = (mouse_event->localPos().y()) / (long double)height();
#endif
#endif
if (!mouse_tablet_in_proximity)
mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity;
@@ -544,6 +558,7 @@ RendererStack::event(QEvent* event)
return QWidget::event(event);
}
#ifdef TOUCH_PR
#ifdef Q_OS_WINDOWS
if (mouse_input_mode == 0) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
@@ -574,6 +589,39 @@ RendererStack::event(QEvent* event)
#else
mouse_x_abs = (mouse_event->localPos().x()) / (double)width();
mouse_y_abs = (mouse_event->localPos().y()) / (double)height();
#endif
#else
#ifdef Q_OS_WINDOWS
if (mouse_input_mode == 0) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
mouse_x_abs = (mouse_event->position().x()) / (long double)width();
mouse_y_abs = (mouse_event->position().y()) / (long double)height();
#else
mouse_x_abs = (mouse_event->localPos().x()) / (long double)width();
mouse_y_abs = (mouse_event->localPos().y()) / (long double)height();
#endif
mouse_x_abs -= rendererWindow->destinationF.left();
mouse_y_abs -= rendererWindow->destinationF.top();
if (mouse_x_abs < 0) mouse_x_abs = 0;
if (mouse_y_abs < 0) mouse_y_abs = 0;
mouse_x_abs /= rendererWindow->destinationF.width();
mouse_y_abs /= rendererWindow->destinationF.height();
if (mouse_x_abs > 1) mouse_x_abs = 1;
if (mouse_y_abs > 1) mouse_y_abs = 1;
return QWidget::event(event);
}
#endif
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
mouse_x_abs = (mouse_event->position().x()) / (long double)width();
mouse_y_abs = (mouse_event->position().y()) / (long double)height();
#else
mouse_x_abs = (mouse_event->localPos().x()) / (long double)width();
mouse_y_abs = (mouse_event->localPos().y()) / (long double)height();
#endif
#endif
mouse_x_abs -= rendererWindow->destinationF.left();
mouse_y_abs -= rendererWindow->destinationF.top();
@@ -587,6 +635,7 @@ RendererStack::event(QEvent* event)
if (mouse_x_abs > 1) mouse_x_abs = 1;
if (mouse_y_abs > 1) mouse_y_abs = 1;
mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity;
#ifdef TOUCH_PR
} else switch (event->type()) {
case QEvent::TouchBegin:
case QEvent::TouchUpdate:
@@ -685,6 +734,7 @@ RendererStack::event(QEvent* event)
default:
return QWidget::event(event);
#endif
}
return QWidget::event(event);

View File

@@ -46,7 +46,7 @@ SettingsDisplay::SettingsDisplay(QWidget *parent)
for (uint8_t i = 0; i < GFXCARD_MAX; i ++)
videoCard[i] = gfxcard[i];
ui->lineEdit->setFilter(tr("EDID") % util::DlgFilter({ "bin", "dat", "edid", "txt" }) % tr("All files") % util::DlgFilter({ "*" }, true));
ui->lineEditCustomEDID->setFilter(tr("EDID") % util::DlgFilter({ "bin", "dat", "edid", "txt" }) % tr("All files") % util::DlgFilter({ "*" }, true));
onCurrentMachineChanged(machine);
}
@@ -77,7 +77,7 @@ SettingsDisplay::save()
da2_standalone_enabled = ui->checkBoxDa2->isChecked() ? 1 : 0;
monitor_edid = ui->radioButtonCustom->isChecked() ? 1 : 0;
strncpy(monitor_edid_path, ui->lineEdit->fileName().toUtf8().data(), sizeof(monitor_edid_path) - 1);
strncpy(monitor_edid_path, ui->lineEditCustomEDID->fileName().toUtf8().data(), sizeof(monitor_edid_path) - 1);
}
void
@@ -135,8 +135,8 @@ SettingsDisplay::onCurrentMachineChanged(int machineId)
ui->radioButtonDefault->setChecked(monitor_edid == 0);
ui->radioButtonCustom->setChecked(monitor_edid == 1);
ui->lineEdit->setFileName(monitor_edid_path);
ui->lineEdit->setEnabled(monitor_edid == 1);
ui->lineEditCustomEDID->setFileName(monitor_edid_path);
ui->lineEditCustomEDID->setEnabled(monitor_edid == 1);
}
void
@@ -326,7 +326,7 @@ void SettingsDisplay::on_radioButtonDefault_clicked()
{
ui->radioButtonDefault->setChecked(true);
ui->radioButtonCustom->setChecked(false);
ui->lineEdit->setEnabled(false);
ui->lineEditCustomEDID->setEnabled(false);
}
@@ -334,7 +334,7 @@ void SettingsDisplay::on_radioButtonCustom_clicked()
{
ui->radioButtonDefault->setChecked(false);
ui->radioButtonCustom->setChecked(true);
ui->lineEdit->setEnabled(true);
ui->lineEditCustomEDID->setEnabled(true);
}
void SettingsDisplay::on_pushButtonExportDefault_clicked()

View File

@@ -26,27 +26,45 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxVoodoo">
<item row="0" column="0">
<widget class="QLabel" name="labelVideo">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Voodoo 1 or 2 Graphics</string>
<string>Video:</string>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QPushButton" name="pushButtonConfigureDa2">
<item row="1" column="0" colspan="2">
<widget class="QComboBox" name="comboBoxVideo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButtonConfigureVideo">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="checkBox8514">
<property name="text">
<string>IBM 8514/A Graphics</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelVideoSecondary">
<property name="sizePolicy">
@@ -60,6 +78,47 @@
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QComboBox" name="comboBoxVideoSecondary">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="pushButtonConfigureVideoSecondary">
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxVoodoo">
<property name="text">
<string>Voodoo 1 or 2 Graphics</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="pushButtonConfigureVoodoo">
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="checkBox8514">
<property name="text">
<string>IBM 8514/A Graphics</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QPushButton" name="pushButtonConfigure8514">
<property name="text">
@@ -67,6 +126,13 @@
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxXga">
<property name="text">
<string>XGA Graphics</string>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QPushButton" name="pushButtonConfigureXga">
<property name="text">
@@ -74,8 +140,22 @@
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxDa2">
<property name="text">
<string>IBM PS/55 Display Adapter Graphics</string>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QPushButton" name="pushButtonConfigureDa2">
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="3">
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="groupBoxEDID">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -85,9 +165,9 @@
<property name="title">
<string>Monitor EDID</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutGroupBoxEDID">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="horizontalLayoutEDIDDefault">
<item>
<widget class="QRadioButton" name="radioButtonDefault">
<property name="text">
@@ -111,9 +191,9 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QHBoxLayout" name="horizontalLayoutEDIDCustom">
<property name="sizeConstraint">
<enum>QLayout::SizeConstraint::SetNoConstraint</enum>
<enum>QLayout::SetNoConstraint</enum>
</property>
<item>
<widget class="QRadioButton" name="radioButtonCustom">
@@ -123,7 +203,7 @@
</widget>
</item>
<item>
<widget class="FileField" name="lineEdit" native="true">
<widget class="FileField" name="lineEditCustomEDID" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -137,99 +217,6 @@
</layout>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QComboBox" name="comboBoxVideoSecondary">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
<item row="10" column="0" colspan="3">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="pushButtonConfigureVoodoo">
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButtonConfigureVideo">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelVideo">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Video:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="pushButtonConfigureVideoSecondary">
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QComboBox" name="comboBoxVideo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxXga">
<property name="text">
<string>XGA Graphics</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="checkBoxDa2">
<property name="text">
<string>IBM PS/55 Display Adapter Graphics</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="3">
<widget class="QWidget" name="widget" native="true">
<property name="sizePolicy">
@@ -240,6 +227,19 @@
</property>
</widget>
</item>
<item row="10" column="0" colspan="3">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<customwidgets>
@@ -250,6 +250,23 @@
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>comboBoxVideo</tabstop>
<tabstop>pushButtonConfigureVideo</tabstop>
<tabstop>comboBoxVideoSecondary</tabstop>
<tabstop>pushButtonConfigureVideoSecondary</tabstop>
<tabstop>checkBoxVoodoo</tabstop>
<tabstop>pushButtonConfigureVoodoo</tabstop>
<tabstop>checkBox8514</tabstop>
<tabstop>pushButtonConfigure8514</tabstop>
<tabstop>checkBoxXga</tabstop>
<tabstop>pushButtonConfigureXga</tabstop>
<tabstop>checkBoxDa2</tabstop>
<tabstop>pushButtonConfigureDa2</tabstop>
<tabstop>radioButtonDefault</tabstop>
<tabstop>pushButtonExportDefault</tabstop>
<tabstop>radioButtonCustom</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>

View File

@@ -41,144 +41,18 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<item row="0" column="0">
<widget class="QLabel" name="labelSearch">
<property name="text">
<string>Machine:</string>
<string>Search:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>CPU type:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="spinBoxRAM">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Memory:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QWidget" name="widget_2" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="comboBoxCPU">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Frequency:</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBoxSpeed">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="5" column="1">
<widget class="QWidget" name="widget_4" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="comboBoxWaitStates">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>PIT mode:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBoxPitMode">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
</layout>
</widget>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditSearch"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<widget class="QLabel" name="labelMachineType">
<property name="text">
<string>Machine type:</string>
</property>
@@ -191,17 +65,10 @@
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="comboBoxFPU">
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_5">
<item row="2" column="0">
<widget class="QLabel" name="labelMachine">
<property name="text">
<string>Wait states:</string>
<string>Machine:</string>
</property>
</widget>
</item>
@@ -243,22 +110,155 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelCPU">
<property name="text">
<string>CPU type:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QWidget" name="widget_2" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="comboBoxCPU">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelSpeed">
<property name="text">
<string>Frequency:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBoxSpeed">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="labelFPU">
<property name="text">
<string>FPU:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Search:</string>
<item row="4" column="1">
<widget class="QComboBox" name="comboBoxFPU">
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditSearch"/>
<item row="5" column="0">
<widget class="QLabel" name="labelWaitStates">
<property name="text">
<string>Wait states:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QWidget" name="widget_4" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="comboBoxWaitStates">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelPITMode">
<property name="text">
<string>PIT mode:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBoxPitMode">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maxVisibleItems">
<number>30</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="labelMemory">
<property name="text">
<string>Memory:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="spinBoxRAM">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
@@ -312,7 +312,7 @@
<item>
<spacer name="softFloatHorizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -325,92 +325,116 @@
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>CPU frame size</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QRadioButton" name="radioButtonLargerFrames">
<property name="text">
<string>Larger frames (less smooth)</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonSmallerFrames">
<property name="text">
<string>Smaller frames (smoother)</string>
</property>
</widget>
</item>
</layout>
</widget>
<layout class="QHBoxLayout" name="groupBoxesLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBoxTimeSync">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Time synchronization</string>
</property>
<layout class="QVBoxLayout" name="groupBoxTimeSyncLayout">
<item>
<widget class="QRadioButton" name="radioButtonDisabled">
<property name="text">
<string>Disabled</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonLocalTime">
<property name="text">
<string>Enabled (local time)</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonUTC">
<property name="text">
<string>Enabled (UTC)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="timeSyncVerticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBoxCPUFrameSize">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>CPU frame size</string>
</property>
<layout class="QVBoxLayout" name="groupBoxCPUFrameSizeLayout">
<item>
<widget class="QRadioButton" name="radioButtonLargerFrames">
<property name="text">
<string>Larger frames (less smooth)</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonSmallerFrames">
<property name="text">
<string>Smaller frames (smoother)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="frameSizeVerticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="groupBoxesHorizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Time synchronization</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="radioButtonDisabled">
<property name="text">
<string>Disabled</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonLocalTime">
<property name="text">
<string>Enabled (local time)</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonUTC">
<property name="text">
<string>Enabled (UTC)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -422,19 +446,6 @@
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<tabstops>

View File

@@ -15,10 +15,10 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="sizeConstraint">
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="labelSystemDir">
<property name="text">
<string>System Directory:</string>
</property>
@@ -146,7 +146,7 @@
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -159,10 +159,10 @@
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>

View File

@@ -344,7 +344,7 @@ ad1848_write(uint16_t addr, uint8_t val, void *priv)
case 12:
if (ad1848->type >= AD1848_TYPE_CS4248) {
ad1848->regs[12] = 0x80 | (val & 0x70) | (ad1848->regs[12] & 0x0f);
ad1848->regs[12] = 0x80 | (val & 0x60) | (ad1848->regs[12] & 0x0f);
if ((ad1848->type >= AD1848_TYPE_CS4231) && (ad1848->type < AD1848_TYPE_CS4235)) {
if (val & 0x40)
ad1848->fmt_mask |= 0x80;
@@ -425,6 +425,19 @@ ad1848_write(uint16_t addr, uint8_t val, void *priv)
ad1848->fm_vol_r = (int) ad1848_vols_5bits_aux_gain[val & 0x1f];
}
}
if ((ad1848->type >= AD1848_TYPE_CS4232) && (ad1848->type <= AD1848_TYPE_CS4236)) {
if (ad1848->index == 18) {
if (val & 0x80)
ad1848->fm_vol_l = 0;
else
ad1848->fm_vol_l = (int) ad1848_vols_5bits_aux_gain[val & 0x1f];
} else {
if (val & 0x80)
ad1848->fm_vol_r = 0;
else
ad1848->fm_vol_r = (int) ad1848_vols_5bits_aux_gain[val & 0x1f];
}
}
break;
case 20 ... 21:
@@ -508,6 +521,8 @@ readonly_x:
}
if (ad1848->type == AD1848_TYPE_CS4231) /* I23 is reserved and read-only on CS4231 non-A */
goto readonly_i;
if ((ad1848->type >= AD1848_TYPE_CS4232) || (ad1848->type <= AD1848_TYPE_CS4236)) /* I23 bits 7-1 are read-only on CS4231A/4232/4236 non-B, Win2k relies on this for detection */
val = (val & 0x01);
break;
case 24:

View File

@@ -568,7 +568,11 @@ cs423x_ctxswitch_write(uint16_t addr, UNUSED(uint8_t val), void *priv)
{
cs423x_t *dev = (cs423x_t *) priv;
uint8_t ctx = (dev->regs[7] & 0x80);
uint8_t enable_opl = (dev->ad1848.xregs[4] & 0x10) && !(dev->indirect_regs[2] & 0x85);
uint8_t enable_opl = (dev->ad1848.xregs[4] & 0x10) && !(dev->indirect_regs[2] & 0x85); /* CS4236B+ */
/* CS4232/4236 (non-B) doesn't have an IFM bit, always enable the OPL on these chips */
if (dev->type <= CRYSTAL_CS4236)
enable_opl = 1;
/* Check if a context switch (WSS=1 <-> SBPro=0) occurred through the address being written. */
if ((dev->regs[7] & 0x80) ? ((addr & 0xfff0) == dev->sb_base) : ((addr & 0xfffc) == dev->wss_base)) {
@@ -1005,6 +1009,7 @@ cs423x_init(const device_t *info)
/* Initialize SBPro codec. The WSS codec is initialized later by cs423x_reset */
dev->sb = device_add_inst(&sb_pro_compat_device, 1);
sound_set_cd_audio_filter(sbpro_filter_cd_audio, dev->sb); /* CD audio filter for the default context */
music_add_handler(sb_get_music_buffer_sbpro, dev->sb); /* Init the SBPro OPL3 since sb_pro_compat_init does not */
/* Initialize RAM, registers and WSS codec. */
cs423x_reset(dev);

View File

@@ -22,7 +22,9 @@
#include <stdint.h>
#include <stdlib.h>
#define __USE_LARGEFILE64
#ifndef __USE_LARGEFILE64
#define __USE_LARGEFILE64 1
#endif
#include <sys/types.h>
#if (defined(__HAIKU__) || defined(__unix__) || defined(__APPLE__)) && !defined(__linux__)

View File

@@ -64,7 +64,7 @@ ddc_load_edid(char *path, uint8_t *buf, size_t size)
// Check the beginning of the file for the EDID header.
uint64_t header;
fread(&header, sizeof(header), 1, fp);
(void) !fread(&header, sizeof(header), 1, fp);
if (header == EDID_HEADER) {
// Binary format. Read as is