mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 10:28:19 -07:00
Merge remote-tracking branch 'origin/master' into feature/recompiler_improvements
This commit is contained in:
45
.ci/build.sh
45
.ci/build.sh
@@ -880,6 +880,31 @@ then
|
||||
exit 5
|
||||
fi
|
||||
|
||||
# Download assets if we're making a release build.
|
||||
if grep -qiE "^BUILD_TYPE:[^=]+=release" build/CMakeCache.txt 2> /dev/null
|
||||
then
|
||||
git_repo=$(git remote get-url origin 2> /dev/null)
|
||||
if [ "$CI" = "true" ]
|
||||
then
|
||||
# Backup strategy when running under Jenkins.
|
||||
[ -z "$git_repo" ] && git_repo=$GIT_URL
|
||||
fi
|
||||
if [ -n "$git_repo" ]
|
||||
then
|
||||
echo [-] Downloading assets
|
||||
cd archive_tmp
|
||||
if ! git clone --depth 1 "$(dirname "$git_repo")/assets.git" assets
|
||||
then
|
||||
echo [!] Assets download failed
|
||||
exit 7
|
||||
fi
|
||||
# Remove dot directories (including .git) and top level files.
|
||||
rm -rf assets/.* 2> /dev/null
|
||||
rm -f assets/* 2> /dev/null
|
||||
cd ..
|
||||
fi
|
||||
fi
|
||||
|
||||
# Archive the executable and its dependencies.
|
||||
# The executable should always be archived last for the check after this block.
|
||||
status=0
|
||||
@@ -902,7 +927,7 @@ then
|
||||
[ ! -e "archive_tmp/discord_game_sdk.dll" ] && echo [!] No Discord Game SDK for architecture [$arch_discord]
|
||||
|
||||
# Archive XAudio2 DLL if required.
|
||||
grep -q "OPENAL:BOOL=ON" build/CMakeCache.txt || cp -p "/home/$project/dll$arch/xaudio2"* archive_tmp/
|
||||
grep -qiE "^OPENAL:BOOL=ON" build/CMakeCache.txt || cp -p "/home/$project/dll$arch/xaudio2"* archive_tmp/
|
||||
|
||||
# Archive executable, while also stripping it if requested.
|
||||
if [ $strip -ne 0 ]
|
||||
@@ -971,6 +996,14 @@ then
|
||||
done
|
||||
fi
|
||||
|
||||
# Archive assets.
|
||||
if [ -d archive_tmp/assets ]
|
||||
then
|
||||
data_dir="$(echo "archive_tmp/"*".app/Contents")"
|
||||
mkdir -p "$data_dir/Resources"
|
||||
mv archive_tmp/assets "$data_dir/Resources/assets"
|
||||
fi
|
||||
|
||||
# Sign app bundle, unless we're in an universal build.
|
||||
[ $skip_archive -eq 0 ] && codesign --force --deep $(mac_signidentity) -o runtime --entitlements src/mac/entitlements.plist --timestamp "archive_tmp/"*".app"
|
||||
elif [ "$BUILD_TAG" = "precondition" ]
|
||||
@@ -982,7 +1015,7 @@ else
|
||||
cwd_root="$(pwd)"
|
||||
check_buildtag "libs.$arch_deb"
|
||||
|
||||
if grep -q "OPENAL:BOOL=ON" build/CMakeCache.txt
|
||||
if grep -qiE "^OPENAL:BOOL=ON" build/CMakeCache.txt
|
||||
then
|
||||
# Build openal-soft 1.23.1 manually to fix audio issues. This is a temporary
|
||||
# workaround until a newer version of openal-soft trickles down to Debian repos.
|
||||
@@ -1133,6 +1166,14 @@ else
|
||||
done
|
||||
project_icon=$(find "$icon_base/"[0-9]*x[0-9]*/* -type f -name '*.png' -o -name '*.svg' | head -1 | grep -oP '/\K([^/]+)(?=\.[^\.]+$)')
|
||||
|
||||
# Archive assets.
|
||||
if [ -d archive_tmp/assets ]
|
||||
then
|
||||
data_dir="archive_tmp/usr/local/share/$project"
|
||||
mkdir -p "$data_dir"
|
||||
mv archive_tmp/assets "$data_dir/assets"
|
||||
fi
|
||||
|
||||
# Archive executable, while also stripping it if requested.
|
||||
mkdir -p archive_tmp/usr/local/bin
|
||||
if [ $strip -ne 0 ]
|
||||
|
||||
12
src/86box.c
12
src/86box.c
@@ -768,8 +768,10 @@ pc_init(int argc, char *argv[])
|
||||
p = path_get_filename(exe_path);
|
||||
*p = '\0';
|
||||
#if defined(__APPLE__)
|
||||
char contents_path[2048] = {0};
|
||||
c = strlen(exe_path);
|
||||
if ((c >= 16) && !strcmp(&exe_path[c - 16], "/Contents/MacOS/")) {
|
||||
strncpy(contents_path, exe_path, c - 7);
|
||||
exe_path[c - 16] = '\0';
|
||||
p = path_get_filename(exe_path);
|
||||
*p = '\0';
|
||||
@@ -1036,10 +1038,18 @@ usage:
|
||||
path_append_filename(temp, usr_path, "assets");
|
||||
asset_add_path(temp);
|
||||
|
||||
// Add the standard ROM path in the same directory as the executable.
|
||||
// Add the standard asset path in the same directory as the executable.
|
||||
path_append_filename(temp, exe_path, "assets");
|
||||
asset_add_path(temp);
|
||||
|
||||
#ifdef __APPLE__
|
||||
// Add the standard asset path within the app bundle.
|
||||
if (contents_path[0] != '\0') {
|
||||
path_append_filename(temp, contents_path, "Resources/assets");
|
||||
asset_add_path(temp);
|
||||
}
|
||||
#endif
|
||||
|
||||
plat_init_asset_paths();
|
||||
|
||||
/*
|
||||
|
||||
@@ -971,7 +971,7 @@ extern const device_t p54tp4xe_device;
|
||||
#endif
|
||||
extern int machine_at_p54tp4xe_init(const machine_t *);
|
||||
extern int machine_at_exp8551_init(const machine_t *);
|
||||
extern int machine_at_hpholly_init(const machine_t *);
|
||||
extern int machine_at_holly_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t vectra52_device;
|
||||
#endif
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
#define AC97_CODEC_ALC100 AC97_VENDOR_ID('A', 'L', 'C', 0x20)
|
||||
#define AC97_CODEC_CS4297 AC97_VENDOR_ID('C', 'R', 'Y', 0x03)
|
||||
#define AC97_CODEC_CS4297A AC97_VENDOR_ID('C', 'R', 'Y', 0x11)
|
||||
#define AC97_CODEC_ICE1232 AC97_VENDOR_ID('I', 'C', 'E', 0x11)
|
||||
#define AC97_CODEC_STAC9708 AC97_VENDOR_ID(0x83, 0x84, 0x76, 0x08)
|
||||
#define AC97_CODEC_STAC9721 AC97_VENDOR_ID(0x83, 0x84, 0x76, 0x09)
|
||||
#define AC97_CODEC_TR28023 AC97_VENDOR_ID('T', 'R', 'A', 0x03)
|
||||
@@ -161,9 +162,11 @@ extern const device_t alc100_device;
|
||||
extern const device_t cs4297_device;
|
||||
extern const device_t cs4297a_device;
|
||||
# define ct1297_device tr28023_device
|
||||
extern const device_t ice1232_device;
|
||||
extern const device_t stac9708_device;
|
||||
extern const device_t stac9721_device;
|
||||
extern const device_t tr28023_device;
|
||||
# define vt1611a_device ice1232_device
|
||||
extern const device_t w83971d_device;
|
||||
extern const device_t wm9701a_device;
|
||||
#ifdef USE_SOFTMODEM
|
||||
|
||||
@@ -425,7 +425,7 @@ static const device_config_t bx6_config[] = {
|
||||
.bios = {
|
||||
{
|
||||
.name = "Award Modular BIOS v4.51PG - Revision EG",
|
||||
.internal_name = "bx6_eg",
|
||||
.internal_name = "bx6",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
@@ -434,7 +434,7 @@ static const device_config_t bx6_config[] = {
|
||||
},
|
||||
{
|
||||
.name = "Award Modular BIOS v4.51PG - Revision QS",
|
||||
.internal_name = "bx6",
|
||||
.internal_name = "bx6_qs",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
@@ -1057,8 +1057,8 @@ machine_at_p6sba_init(const machine_t *model)
|
||||
device_add_params(&w83977_device, (void *) (W83977TF | W83977_AMI | W83977_NO_NVR));
|
||||
device_add(&intel_flash_bxt_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x7, 256);
|
||||
device_add(&w83781d_device); /* fans: CPU1, CPU2, Thermal Control; temperatures: unused, CPU1, CPU2 */
|
||||
hwm_values.voltages[1] = 3300; /* Seems to be the I/O voltage, reported as "CPUi/o" in the Leadtek BIOS and "CPU2" in the SuperMicro BIOS */
|
||||
device_add(&w83781d_device); /* fans: CPU1, CPU2, Thermal Control; temperatures: unused, CPU1, CPU2 */
|
||||
hwm_values.voltages[1] = 1500; /* potentially Vtt; Leadtek BIOS calls it CPUi/o; Supermicro BIOS calls it CPU2 and reads a voltage this low as N/A */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -611,10 +611,9 @@ machine_at_ms6318_init(const machine_t *model)
|
||||
hwm_values.temperatures[1] += 2; /* System offset */
|
||||
hwm_values.temperatures[2] = 0; /* unused */
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL) {
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
device_add(machine_get_snd_device(machine));
|
||||
device_add(&stac9708_device);
|
||||
}
|
||||
device_add(&vt1611a_device); /* for both VIA and CT5880 options */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ machine_at_exp8551_init(const machine_t *model)
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_hpholly_gpio_init(void)
|
||||
machine_at_holly_gpio_init(void)
|
||||
{
|
||||
uint32_t gpio = 0xffffe2ff;
|
||||
|
||||
@@ -193,19 +193,19 @@ machine_at_hpholly_gpio_init(void)
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_hpholly_init(const machine_t *model) /* HP Pavilion Holly, 7070/7090/5100/7100 */
|
||||
machine_at_holly_init(const machine_t *model) /* HP Pavilion Holly, 7070/7090/5100/7100 */
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear_combined("roms/machines/hpholly/1005CA2L.BIO",
|
||||
"roms/machines/hpholly/1005CA2L.BI1",
|
||||
ret = bios_load_linear_combined("roms/machines/holly/1005CA2L.BIO",
|
||||
"roms/machines/holly/1005CA2L.BI1",
|
||||
0x20000, 128);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
machine_at_hpholly_gpio_init();
|
||||
machine_at_holly_gpio_init();
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
|
||||
@@ -1704,27 +1704,6 @@ machine_xt_pcxt_init(const machine_t *model)
|
||||
|
||||
static const device_config_t to16_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "bios",
|
||||
.description = "BIOS Version",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "to16",
|
||||
.default_int = 0,
|
||||
.file_filter = NULL,
|
||||
.spinner = { 0 },
|
||||
.bios = {
|
||||
{
|
||||
.name = "1.03",
|
||||
.internal_name = "to16",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
.size = 32768,
|
||||
.files = { "roms/machines/to16/TO16_103.bin", "" }
|
||||
},
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "rtc_port",
|
||||
.description = "Onboard RTC",
|
||||
@@ -1777,23 +1756,17 @@ const device_t to16_device = {
|
||||
int
|
||||
machine_xt_to16_init(const machine_t *model)
|
||||
{
|
||||
int ret = 0;
|
||||
int rtc_port = 0;
|
||||
const char *fn;
|
||||
int ret;
|
||||
|
||||
/* No ROMs available. */
|
||||
if (!device_available(model->device))
|
||||
return ret;
|
||||
|
||||
device_context(model->device);
|
||||
rtc_port = machine_get_config_int("rtc_port");
|
||||
fn = device_get_bios_file(model->device, device_get_config_bios("bios"), 0);
|
||||
ret = bios_load_linear(fn, 0x000f8000, 32768, 0);
|
||||
device_context_restore();
|
||||
ret = bios_load_linear("roms/machines/to16/TO16_103.bin", 0x000f8000, 32768, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
device_context(model->device);
|
||||
int rtc_port = machine_get_config_int("rtc_port");
|
||||
device_context_restore();
|
||||
|
||||
machine_xt_clone_init(model, 0);
|
||||
|
||||
if (rtc_port != 0)
|
||||
|
||||
@@ -13427,10 +13427,10 @@ const machine_t machines[] = {
|
||||
Command 0xA0 copyright string: (C)1994 AMI . */
|
||||
{
|
||||
.name = "[i430FX] HP Pavilion 51xx/7070/7090/71xx (Holly)",
|
||||
.internal_name = "hpholly",
|
||||
.internal_name = "holly",
|
||||
.type = MACHINE_TYPE_SOCKET7_3V,
|
||||
.chipset = MACHINE_CHIPSET_INTEL_430FX,
|
||||
.init = machine_at_hpholly_init,
|
||||
.init = machine_at_holly_init,
|
||||
.p1_handler = machine_generic_p1_handler,
|
||||
.gpio_handler = NULL,
|
||||
.available_flag = MACHINE_AVAILABLE,
|
||||
@@ -20598,7 +20598,7 @@ machine_has_flags_ex(int flags)
|
||||
int ret = machine_has_flags(machine, flags);
|
||||
|
||||
if (flags & MACHINE_PS2_KBC) {
|
||||
if (machine_is_ps2 && (strcmp(machine_get_internal_name(), "pc5286")))
|
||||
if (machine_is_ps2 && (machines[machine].init != machine_at_pc5286_init))
|
||||
ret |= MACHINE_PS2_KBC;
|
||||
else
|
||||
ret &= ~MACHINE_PS2_KBC;
|
||||
|
||||
18
src/nvr_at.c
18
src/nvr_at.c
@@ -635,6 +635,13 @@ nvr_reg_write(uint16_t reg, uint8_t val, void *priv)
|
||||
nvr_reg_common_write(reg, val, nvr, local);
|
||||
break;
|
||||
|
||||
case 0x39:
|
||||
if (machines[machine].init == machine_at_bx6_init)
|
||||
nvr_reg_common_write(reg, val | 0x08, nvr, local);
|
||||
else
|
||||
nvr_reg_common_write(reg, val, nvr, local);
|
||||
break;
|
||||
|
||||
default: /* non-RTC registers are just NVRAM */
|
||||
nvr_reg_common_write(reg, val, nvr, local);
|
||||
break;
|
||||
@@ -794,6 +801,14 @@ nvr_read(uint16_t addr, void *priv)
|
||||
ret = nvr->regs[local->addr[addr_id]];
|
||||
break;
|
||||
|
||||
case 0x39:
|
||||
if (!(local->lock[local->addr[addr_id]] & 0x02)) {
|
||||
ret = nvr->regs[local->addr[addr_id]];
|
||||
if (machines[machine].init == machine_at_bx6_init)
|
||||
ret |= 0x08;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x3e:
|
||||
case 0x3f:
|
||||
if (!nvr->is_new && (local->flags & FLAG_AMI_1995_HACK)) {
|
||||
@@ -1216,6 +1231,9 @@ nvr_at_init(const device_t *info)
|
||||
if (nvr->is_new && (machines[machine].init == machine_at_spitfire_init))
|
||||
nvr->regs[0x33] = nvr->regs[0x34] = 0xff;
|
||||
|
||||
if (nvr->is_new && (machines[machine].init == machine_at_bx6_init))
|
||||
nvr->regs[0x39] = 0x09;
|
||||
|
||||
return nvr;
|
||||
}
|
||||
|
||||
|
||||
@@ -308,6 +308,10 @@
|
||||
<addaction name="actionSettings"/>
|
||||
</widget>
|
||||
<action name="actionForce_interpretation">
|
||||
<property name="icon">
|
||||
<iconset resource="../qt_resources.qrc">
|
||||
<normaloff>:/menuicons/qt/icons/interpreter.ico</normaloff>:/menuicons/qt/icons/interpreter.ico</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
||||
@@ -305,13 +305,11 @@ void
|
||||
VMManagerSystem::generateSearchTerms()
|
||||
{
|
||||
searchTerms.clear();
|
||||
#if 0
|
||||
for (const auto &value : display_table.values())
|
||||
if (value.contains(";"))
|
||||
searchTerms.append(value.split(';'));
|
||||
else
|
||||
searchTerms.append(value);
|
||||
#endif
|
||||
searchTerms.append(displayName);
|
||||
searchTerms.append(config_name);
|
||||
QRegularExpression whitespaceRegex("\\s+");
|
||||
|
||||
@@ -35,7 +35,7 @@ static const struct {
|
||||
uint16_t reset_flags;
|
||||
uint16_t extid_flags;
|
||||
uint8_t pcsr_mask; /* register 26 bits [15:8] */
|
||||
uint8_t eascr_mask; /* register 2A bits [14:11] (audio) or 56 bits ... */
|
||||
uint8_t eascr_mask; /* register 2A bits [14:11] */
|
||||
uint8_t modem_flags;
|
||||
uint16_t gpi_mask; /* modem GPIO input-capable bits */
|
||||
uint16_t gpo_mask; /* modem GPIO output-capable bits */
|
||||
@@ -80,6 +80,14 @@ static const struct {
|
||||
.pcsr_mask = 0xff,
|
||||
.vendor_regs = (const ac97_vendor_reg_t[]) {{0, 0x5e, 0x0000, 0x01b0}, {0, 0x60, 0x0023, 0x0001}, {0, 0x68, 0x0000, 0xdfff}, {0}}
|
||||
},
|
||||
{
|
||||
.device = &ice1232_device,
|
||||
.misc_flags = AC97_AUDIO | AC97_AUXOUT | AC97_MONOOUT | AC97_PCBEEP | AC97_PHONE | AC97_VIDEO | AC97_AUXIN | AC97_MS | AC97_LPBK,
|
||||
.reset_flags = AC97_HPOUT | AC97_DAC_18B | AC97_ADC_18B | (27 << AC97_3D_SHIFT),
|
||||
.extid_flags = AC97_VRA | AC97_AMAP,
|
||||
.pcsr_mask = 0xff,
|
||||
.vendor_regs = (const ac97_vendor_reg_t[]) {{0, 0x5a, 0x0021, 0x00fd}, {0}}
|
||||
},
|
||||
{
|
||||
.device = &stac9708_device,
|
||||
.misc_flags = AC97_AUDIO | AC97_AUXOUT | AC97_MONOOUT | AC97_PCBEEP | AC97_PHONE | AC97_VIDEO | AC97_AUXIN | AC97_MS | AC97_LPBK,
|
||||
@@ -890,6 +898,20 @@ const device_t cs4297a_device = {
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t ice1232_device = {
|
||||
.name = "ICEnsemble ICE1232 / VIA VT1611A",
|
||||
.internal_name = "ice1232",
|
||||
.flags = DEVICE_AC97,
|
||||
.local = AC97_CODEC_ICE1232,
|
||||
.init = ac97_codec_init,
|
||||
.close = ac97_codec_close,
|
||||
.reset = ac97_codec_reset,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t stac9708_device = {
|
||||
.name = "SigmaTel STAC9708",
|
||||
.internal_name = "stac9708",
|
||||
|
||||
@@ -1285,7 +1285,7 @@ const device_t mirosound_pcm10_device = {
|
||||
};
|
||||
|
||||
const device_t opti_82c930_device = {
|
||||
.name = "OPTi 82c930",
|
||||
.name = "OPTi 82C930",
|
||||
.internal_name = "opti_82c930",
|
||||
.flags = DEVICE_ISA16,
|
||||
.local = OPTI_930 | OPTIMC_CS4231,
|
||||
@@ -1299,7 +1299,7 @@ const device_t opti_82c930_device = {
|
||||
};
|
||||
|
||||
const device_t opti_82c931_device = {
|
||||
.name = "OPTi 82c931",
|
||||
.name = "OPTi 82C931",
|
||||
.internal_name = "opti_82c931",
|
||||
.flags = DEVICE_ISA16,
|
||||
.local = OPTI_930 | OPTIMC_CS4231 | OPTI_931,
|
||||
|
||||
Reference in New Issue
Block a user