From 9c1e6939b43e6f182ecb49df83ecd2612c1f5c3e Mon Sep 17 00:00:00 2001 From: cold-brewed Date: Sun, 11 Jun 2023 14:27:14 -0400 Subject: [PATCH 01/21] qt: Fix qt6 warning --- src/qt/qt_mediahistorymanager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qt/qt_mediahistorymanager.cpp b/src/qt/qt_mediahistorymanager.cpp index f71f74fbe..9d003f464 100644 --- a/src/qt/qt_mediahistorymanager.cpp +++ b/src/qt/qt_mediahistorymanager.cpp @@ -66,8 +66,8 @@ MediaHistoryManager::getHistoryListForDeviceIndex(int index, ui::MediaType type) if ((index >= 0) && (index < master_list[type].size())) { return master_list[type][index]; } else { - qWarning("Media device index %i for device type %s was requested but index %i is out of range (valid range: >= 0 && < %i)", - index, mediaTypeToString(type).toUtf8().constData(), index, master_list[type].size()); + qWarning("Media device index %i for device type %s was requested but index %i is out of range (valid range: >= 0 && < %lli)", + index, mediaTypeToString(type).toUtf8().constData(), index, static_cast(master_list[type].size())); } } // Failure gets an empty list @@ -88,8 +88,8 @@ MediaHistoryManager::getImageForSlot(int index, int slot, ui::MediaType type) if ((slot >= 0) && (slot < device_history.size())) { image_name = device_history[slot]; } else { - qWarning("Media history slot %i, index %i for device type %s was requested but slot %i is out of range (valid range: >= 0 && < %i, device_history.size() is %i)", - slot, index, mediaTypeToString(type).toUtf8().constData(), slot, maxDevicesSupported(type), device_history.size()); + qWarning("Media history slot %i, index %i for device type %s was requested but slot %i is out of range (valid range: >= 0 && < %i, device_history.size() is %lli)", + slot, index, mediaTypeToString(type).toUtf8().constData(), slot, maxDevicesSupported(type), static_cast(device_history.size())); } return image_name; } From cb9b72c31b7cd2ed282611727b1ab181f7b2c936 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 14 Jun 2023 22:40:09 +0200 Subject: [PATCH 02/21] Corrected the Flash and keyboard controller of the Shuttle HOT-433A. --- src/machine/m_at_386dx_486.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 7768202da..17e712a8f 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -1593,10 +1593,8 @@ machine_at_hot433_init(const machine_t *model) device_add(&umc_hb4_device); device_add(&umc_8886af_device); device_add(&um8669f_device); - // device_add(&intel_flash_bxt_device); - device_add(&sst_flash_29ee010_device); - // device_add(&keyboard_at_ami_device); - device_add(&keyboard_ps2_ami_device); + device_add(&winbond_flash_w29c010_device); + device_add(&keyboard_at_ami_device); return ret; } From 85938f4c9a13fcc6ea67b1759cb3ab3742c7e610 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Fri, 16 Jun 2023 23:28:03 -0300 Subject: [PATCH 03/21] Jenkins: Fix openal-soft AppImage build --- .ci/build.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.ci/build.sh b/.ci/build.sh index 432599bd7..a816cd743 100755 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -874,6 +874,11 @@ else cwd_root="$(pwd)" check_buildtag "libs.$arch_deb" + cp cmake/flags-gcc.cmake cmake/flags-gcc.cmake.old + sed -i -e 's/ -Werror=.*\([" ]\)/\1/g' cmake/flags-gcc.cmake # temporary hack for -Werror=old-style-definition non-compliance on FluidSynth and SDL2 + sed -i -e 's/ C;CXX/ IGNORED/' cmake/flags-gcc.cmake # workaround for dynamic c(xx)flags system overwriting library flags and breaking (at least) openal-soft + sed -i -e 's/_INIT / /g' cmake/flags-gcc.cmake # still append our own flags + if grep -q "OPENAL:BOOL=ON" build/CMakeCache.txt then # Build openal-soft 1.23.1 manually to fix audio issues. This is a temporary @@ -890,7 +895,7 @@ else sed -i -e 's/PW_KEY_CONFIG_NAME/"config.name"/g' "$prefix/alc/backends/pipewire.cpp" prefix_build="$prefix/build-$arch_deb" - cmake -G Ninja -D ALSOFT_UTILS=OFF -D ALSOFT_EXAMPLES=OFF -D "CMAKE_TOOLCHAIN_FILE=$toolchain_file" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S "$prefix" -B "$prefix_build" || exit 99 + cmake -G Ninja -D "CMAKE_TOOLCHAIN_FILE=$toolchain_file" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S "$prefix" -B "$prefix_build" || exit 99 cmake --build "$prefix_build" -j$(nproc) || exit 99 cmake --install "$prefix_build" || exit 99 @@ -939,8 +944,6 @@ else rm -rf "$cache_dir/fluidsynth-"* # remove old versions wget -qO - https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.3.0.tar.gz | tar zxf - -C "$cache_dir" || rm -rf "$prefix" fi - cp cmake/flags-gcc.cmake cmake/flags-gcc.cmake.old - sed -i -e 's/ -Werror=.*\([" ]\)/\1/g' cmake/flags-gcc.cmake # temporary hack for -Werror=old-style-definition non-compliance on FluidSynth and SDL2 prefix_build="$prefix/build-$arch_deb" cmake -G Ninja -D enable-dbus=OFF -D enable-jack=OFF -D enable-oss=OFF -D enable-sdl2=OFF -D enable-pulseaudio=OFF -D enable-pipewire=OFF -D enable-alsa=OFF \ -D "CMAKE_TOOLCHAIN_FILE=$toolchain_file" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" \ @@ -978,6 +981,7 @@ else -S "$prefix" -B "$prefix_build" || exit 99 cmake --build "$prefix_build" -j$(nproc) || exit 99 cmake --install "$prefix_build" || exit 99 + mv cmake/flags-gcc.cmake.old cmake/flags-gcc.cmake # Archive Discord Game SDK library. From c3717566c7dd53a8ca6547df436465c9cbbfc98e Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Fri, 16 Jun 2023 23:36:50 -0300 Subject: [PATCH 04/21] Jenkins: Overhaul the build script's dependency report system to be independent --- .ci/build.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.ci/build.sh b/.ci/build.sh index a816cd743..ab7498368 100755 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -156,7 +156,18 @@ do -p) shift - dep_report=1 + + # Check for lddtree and install it if required. + which lddtree > /dev/null || DEBIAN_FRONTEND=noninteractive sudo apt-get -y install pax-utils + + # Default to main binary. + binary="$1" + [ -z "$binary" ] && binary="archive_tmp/usr/local/bin/$project" + + # Run lddtree with AppImage lib directories included in the search path. + LD_LIBRARY_PATH=$(find "$(pwd)/archive_tmp" -type d -name lib -o -name lib64 | while read dir; do find "$dir" -type d; done | tr '\n' ':') \ + lddtree "$binary" + exit $? ;; -s) @@ -198,6 +209,7 @@ if [ -z "$package_name" -a -z "$tarball_name" ] || [ -n "$package_name" -a -z "$ then echo '[!] Usage: build.sh -b {package_name} {architecture} [-t] [cmake_flags...]' echo ' build.sh -s {source_tarball_name}' + echo 'Dep. tree: build.sh -p [archive_tmp/path/to/binary]' exit 100 fi @@ -316,7 +328,7 @@ then pacman -S --needed --noconfirm "$pkg" done fi - + # Clean pacman cache when running under Jenkins to save disk space. [ "$CI" = "true" ] && rm -rf /var/cache/pacman/pkg @@ -560,7 +572,6 @@ else # Establish general dependencies. pkgs="cmake ninja-build pkg-config git wget p7zip-full extra-cmake-modules wayland-protocols tar gzip file appstream" - [ $dep_report -ne 0 ] && pkgs="$pkgs pax-utils" if [ "$(dpkg --print-architecture)" = "$arch_deb" ] then pkgs="$pkgs build-essential" @@ -569,7 +580,7 @@ else if ! dpkg --print-foreign-architectures | grep -qE '^'"$arch_deb"'$' then sudo dpkg --add-architecture "$arch_deb" - + # Force an apt-get update. save_buildtag aptupdate "arch_$arch_deb" fi @@ -1146,16 +1157,6 @@ EOF # Remove appimage-builder binary on failure, just in case it's corrupted. [ $status -ne 0 ] && rm -f "$appimage_builder_binary" - - # Generate library dependency report if requested. - if [ $dep_report -ne 0 ] - then - echo '[-] Library dependency report:' - - # Run lddtree with AppImage lib directories included in the search path. - LD_LIBRARY_PATH=$(find "$(pwd)/archive_tmp" -type d -name lib -o -name lib64 | while read dir; do find "$dir" -type d; done | tr '\n' ':') \ - lddtree "archive_tmp/usr/local/bin/$project" 2>&1 | tee depreport.txt - fi fi # Check if the archival succeeded. From c8f57660a575f021a18891cf2732b8a5f7ee2c62 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 18 Jun 2023 15:31:04 -0300 Subject: [PATCH 05/21] Jenkins: Trigger openal-soft rebuild --- .ci/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/build.sh b/.ci/build.sh index ab7498368..e425cc65a 100755 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -577,7 +577,7 @@ else pkgs="$pkgs build-essential" else # Add foreign architecture if required. - if ! dpkg --print-foreign-architectures | grep -qE '^'"$arch_deb"'$' + if ! dpkg --print-foreign-architectures | grep -Fx "$arch_deb" then sudo dpkg --add-architecture "$arch_deb" From 1e3154cb74a5b08643e96d8cfed1bcda38f11231 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 18 Jun 2023 23:46:10 +0200 Subject: [PATCH 06/21] Increased the size of the regs array in the Eteq ET6000 code. --- src/chipset/et6000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chipset/et6000.c b/src/chipset/et6000.c index eb42ac7cb..ca011e33c 100644 --- a/src/chipset/et6000.c +++ b/src/chipset/et6000.c @@ -35,7 +35,7 @@ typedef struct { - uint8_t index, regs[6]; + uint8_t index, regs[256]; } et6000_t; #ifdef ENABLE_ET6000_LOG From c183b1da3896d2666a4717b16f9c429cc68fcb66 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 18 Jun 2023 23:51:15 +0200 Subject: [PATCH 07/21] Added a specific NULL check to cdrom/cdrom_image_backend.c to please cppcheck. --- src/cdrom/cdrom_image_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdrom/cdrom_image_backend.c b/src/cdrom/cdrom_image_backend.c index 1d39e8c82..5d8294213 100644 --- a/src/cdrom/cdrom_image_backend.c +++ b/src/cdrom/cdrom_image_backend.c @@ -768,7 +768,7 @@ cdi_add_track(cd_img_t *cdi, track_t *cur, uint64_t *shift, uint64_t prestart, u } /* First track (track number must be 1). */ - if (cdi->tracks_num == 0) { + if ((prev == NULL) || (cdi->tracks_num == 0)) { /* I guess this makes sure the structure is not filled with invalid data. */ if (cur->number != 1) return 0; From 29fe9b4d1e59b0924afa0606fae767a545b14ba7 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 18 Jun 2023 23:54:25 +0200 Subject: [PATCH 08/21] Added a sanity check to codegen_new/codegen.h. --- src/codegen_new/codegen.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/codegen_new/codegen.h b/src/codegen_new/codegen.h index 607a2e4ee..547f867e3 100644 --- a/src/codegen_new/codegen.h +++ b/src/codegen_new/codegen.h @@ -140,12 +140,16 @@ codeblock_tree_add(codeblock_t *new_block) block = block->right ? &codeblock[block->right] : NULL; } - if (a < old_block_cmp) - old_block->left = get_block_nr(new_block); - else - old_block->right = get_block_nr(new_block); + if (old_block != NULL) { + if (a < old_block_cmp) + old_block->left = get_block_nr(new_block); + else + old_block->right = get_block_nr(new_block); + + new_block->parent = get_block_nr(old_block); + } else + new_block->parent = BLOCK_INVALID; - new_block->parent = get_block_nr(old_block); new_block->left = new_block->right = BLOCK_INVALID; } } From b7c4973549b077228dbc73b8ea5b6cfab69d4ca2 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 18 Jun 2023 23:56:34 +0200 Subject: [PATCH 09/21] Fixed a off by one error in device.c. --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 8c8ede245..2636634c3 100644 --- a/src/device.c +++ b/src/device.c @@ -142,7 +142,7 @@ device_add_common(const device_t *d, const device_t *cd, void *p, void *params, void *priv = NULL; int c; - for (c = 0; c < 256; c++) { + for (c = 0; c <= 256; c++) { if (!inst && (devices[c] == (device_t *) d)) { device_log("DEVICE: device already exists!\n"); return (NULL); From a0e720494940d9e9c629622cb04c8fea112552e6 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 18 Jun 2023 23:58:05 +0200 Subject: [PATCH 10/21] And fixed it correctly. --- src/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index 2636634c3..a49c7f1e0 100644 --- a/src/device.c +++ b/src/device.c @@ -142,7 +142,7 @@ device_add_common(const device_t *d, const device_t *cd, void *p, void *params, void *priv = NULL; int c; - for (c = 0; c <= 256; c++) { + for (c = 0; c < 256; c++) { if (!inst && (devices[c] == (device_t *) d)) { device_log("DEVICE: device already exists!\n"); return (NULL); @@ -150,8 +150,10 @@ device_add_common(const device_t *d, const device_t *cd, void *p, void *params, if (devices[c] == NULL) break; } - if (c >= DEVICE_MAX) + if ((c >= DEVICE_MAX) || (c >= 256)) { fatal("DEVICE: too many devices\n"); + retrn NULL; + } /* Do this so that a chained device_add will not identify the same ID its master device is already trying to assign. */ From f57f3d883af568fa125026260ebe8af1aae60db9 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 19 Jun 2023 00:01:46 +0200 Subject: [PATCH 11/21] Added a sanity check to hdd_seek_get_time(). --- src/disk/hdd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/disk/hdd.c b/src/disk/hdd.c index c4daf0f83..6135c31d8 100644 --- a/src/disk/hdd.c +++ b/src/disk/hdd.c @@ -161,6 +161,10 @@ hdd_seek_get_time(hard_disk_t *hdd, uint32_t dst_addr, uint8_t operation, uint8_ return HDD_OVERHEAD_TIME; hdd_zone_t *zone = NULL; + if (hdd->num_zones <= 0) { + fatal("hdd_seek_get_time(): hdd->num_zones < 0)\n"); + return 0.0; + } for (int i = 0; i < hdd->num_zones; i++) { zone = &hdd->zones[i]; if (zone->end_sector >= dst_addr) From 5c48f419c0d168dd444ba016833873d69ed63082 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 19 Jun 2023 00:05:46 +0200 Subject: [PATCH 12/21] Fixed variable initialization in network/net_pcnet.c. --- src/network/net_pcnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/net_pcnet.c b/src/network/net_pcnet.c index 17dd506fc..b1ea475ae 100644 --- a/src/network/net_pcnet.c +++ b/src/network/net_pcnet.c @@ -1208,6 +1208,7 @@ pcnetReceiveNoSync(void *priv, uint8_t *buf, int size) uint32_t iRxDesc; int cbPacket; uint8_t buf1[60]; + RMD rmd = { 0 }; if (CSR_DRX(dev) || CSR_STOP(dev) || CSR_SPND(dev) || !size) return 0; @@ -1254,7 +1255,6 @@ pcnetReceiveNoSync(void *priv, uint8_t *buf, int size) iRxDesc = CSR_RCVRL(dev); while (iRxDesc-- > 0) { - RMD rmd; pcnetRmdLoad(dev, &rmd, PHYSADDR(dev, GCPhys), 0); GCPhys += cb; } From 997a068c95ca397a7493ddecfe17eb3bef06ab1f Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 19 Jun 2023 00:07:30 +0200 Subject: [PATCH 13/21] Fixed an off-by-one error in sio/sio_it8661f.c. --- src/sio/sio_it8661f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sio/sio_it8661f.c b/src/sio/sio_it8661f.c index c7d4110be..9b3baa188 100644 --- a/src/sio/sio_it8661f.c +++ b/src/sio/sio_it8661f.c @@ -196,7 +196,7 @@ it8661_ldn(uint16_t addr, uint8_t val, it8661f_t *dev) break; case 1: case 2: - it8661_serial(LDN & 2, addr, val, dev); + it8661_serial((LDN & 2) - 1, addr, val, dev); break; case 3: it8661_lpt(addr, val, dev); From ef0c04ae3ada0ce44a74c155833665437f0f7211 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 19 Jun 2023 00:09:24 +0200 Subject: [PATCH 14/21] Fixed a memory leak in sound/snd_ac97_codec.c. --- src/sound/snd_ac97_codec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/snd_ac97_codec.c b/src/sound/snd_ac97_codec.c index 51bc6bd2b..464e86f77 100644 --- a/src/sound/snd_ac97_codec.c +++ b/src/sound/snd_ac97_codec.c @@ -587,6 +587,7 @@ ac97_codec_init(const device_t *info) /* Associate this codec to the current controller. */ if (!ac97_codec || (ac97_codec_count <= 0)) { pclog("AC97 Codec %d: No controller to associate codec\n", ac97_codec_id); + free(dev); return NULL; } *ac97_codec = dev; From eb677b3d5a82bb13d06bf09b1f1e68c8bd6bf3c4 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 19 Jun 2023 00:11:03 +0200 Subject: [PATCH 15/21] Fixed array out of bound accesses in video/vid_herculesplus.c. --- src/video/vid_herculesplus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/vid_herculesplus.c b/src/video/vid_herculesplus.c index 95d38f1c3..a5422fbc1 100644 --- a/src/video/vid_herculesplus.c +++ b/src/video/vid_herculesplus.c @@ -327,7 +327,7 @@ draw_char_ram4(herculesplus_t *dev, int x, uint8_t chr, uint8_t attr) if ((attr & 0x77) == 0) cfg = ibg; /* 'blank' attribute */ - buffer32->line[dev->displine][x * cw + i] = dev->cols[attr][blink][cfg]; + buffer32->line[dev->displine][x * cw + i] = dev->cols[attr][!!blink][cfg]; val = val << 1; } } @@ -423,7 +423,7 @@ draw_char_ram48(herculesplus_t *dev, int x, uint8_t chr, uint8_t attr) else cfg |= ibg; - buffer32->line[dev->displine][(x * cw) + i] = dev->cols[attr][blink][cfg]; + buffer32->line[dev->displine][(x * cw) + i] = dev->cols[attr][!!blink][cfg]; val = val << 1; } } From 95c900a5dc7e820b20e197ffef4f03d832248c49 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 19 Jun 2023 00:12:19 +0200 Subject: [PATCH 16/21] Fixed off-by-one error in video/vid_ics2494.c. --- src/video/vid_ics2494.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/vid_ics2494.c b/src/video/vid_ics2494.c index 8bb4b0cb8..99a877a75 100644 --- a/src/video/vid_ics2494.c +++ b/src/video/vid_ics2494.c @@ -53,8 +53,8 @@ ics2494_getclock(int clock, void *p) { ics2494_t *ics2494 = (ics2494_t *) p; - if (clock > 16) - clock = 16; + if (clock > 15) + clock = 15; return ics2494->freq[clock]; } From c779956048fc544c3c236b2d8162325107de58e4 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 19 Jun 2023 01:10:15 +0200 Subject: [PATCH 17/21] Fixed a compile-breaking mistake in src/device.c. --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index a49c7f1e0..7d8f5e88e 100644 --- a/src/device.c +++ b/src/device.c @@ -152,7 +152,7 @@ device_add_common(const device_t *d, const device_t *cd, void *p, void *params, } if ((c >= DEVICE_MAX) || (c >= 256)) { fatal("DEVICE: too many devices\n"); - retrn NULL; + return NULL; } /* Do this so that a chained device_add will not identify the same ID From 98b4c1c309f8773ff3a5fa032d260c32e7f6fda2 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 19 Jun 2023 01:27:44 +0200 Subject: [PATCH 18/21] Fixed the TriGem 486G so it is no longer hardcoded to the Paradise VGA BIOS. --- src/machine/m_at_386dx_486.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 17e712a8f..deaa540c4 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -1788,17 +1788,13 @@ machine_at_tg486gp_init(const machine_t *model) int machine_at_tg486g_init(const machine_t *model) { - int ret; + int ret, i; ret = bios_load_linear("roms/machines/tg486g/tg486g.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) return ret; - else { - mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); - mem_mapping_set_exec(&bios_mapping, rom); - } machine_at_common_init(model); device_add(&sis_85c471_device); @@ -1806,5 +1802,12 @@ machine_at_tg486g_init(const machine_t *model) device_add(&fdc37c651_ide_device); device_add(&keyboard_ps2_tg_ami_pci_device); + if (gfxcard[0] != VID_INTERNAL) { + for (i = 0; i < 32768; i++) + rom[i] = mem_readb_phys(0x000c0000 + i); + } + mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000); + mem_mapping_set_exec(&bios_mapping, rom); + return ret; } From a312c101292abd7c144739a8e869489419c0d218 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 19 Jun 2023 01:35:30 +0200 Subject: [PATCH 19/21] Disabled excess logging in chipset/ali1429.c. --- src/chipset/ali1429.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chipset/ali1429.c b/src/chipset/ali1429.c index 138c7db93..e245603a9 100644 --- a/src/chipset/ali1429.c +++ b/src/chipset/ali1429.c @@ -166,7 +166,7 @@ ali1429_write(uint16_t addr, uint8_t val, void *priv) dev->cfg_locked = (val != 0xc5); if (!dev->cfg_locked) { - pclog("M1429: dev->regs[%02x] = %02x\n", dev->index, val); + ali1429_log("M1429: dev->regs[%02x] = %02x\n", dev->index, val); /* Common M1429 Registers */ switch (dev->index) { From 8b559f12712db0c66faabd8273f7ccabf6688978 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 19 Jun 2023 01:59:33 +0200 Subject: [PATCH 20/21] Fixed Y polarity in the MM Series packet format on the Logitech Serial Mouse. --- src/device/mouse_serial.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/device/mouse_serial.c b/src/device/mouse_serial.c index 58183e1df..37dc6b4a0 100644 --- a/src/device/mouse_serial.c +++ b/src/device/mouse_serial.c @@ -214,13 +214,14 @@ sermouse_data_mmseries(mouse_t *dev, int x, int y, int b) dev->data[0] = 0x80; if (x >= 0) dev->data[0] |= 0x10; - if (y >= 0) + /* It appears we have inverted Y polarity. */ + if (y < 0) dev->data[0] |= 0x08; dev->data[0] |= (b & 0x01) ? 0x04 : 0x00; /* left button */ dev->data[0] |= (b & 0x04) ? 0x02 : 0x00; /* middle button */ dev->data[0] |= (b & 0x02) ? 0x01 : 0x00; /* right button */ - dev->data[1] = abs(x); - dev->data[2] = abs(y); + dev->data[1] = abs(x) & 0x7f; + dev->data[2] = abs(y) & 0x7f; return 3; } From 00463a699185f14b6b6082718ab337df0907b44e Mon Sep 17 00:00:00 2001 From: cold-brewed Date: Mon, 19 Jun 2023 12:18:14 -0400 Subject: [PATCH 21/21] config: Fix loading of pcap network device --- src/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config.c b/src/config.c index 4bcbaf7fa..3a66bc01d 100644 --- a/src/config.c +++ b/src/config.c @@ -866,6 +866,8 @@ load_network(void) ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2096, (wchar_t *) IDS_2130); } strcpy(net_cards_conf[c].host_dev_name, "none"); + } else { + strncpy(net_cards_conf[c].host_dev_name, p, sizeof(net_cards_conf[c].host_dev_name) - 1); } } else { strncpy(net_cards_conf[c].host_dev_name, p, sizeof(net_cards_conf[c].host_dev_name) - 1);