From e8406cdbc7b30e90511afe9beb3d2febf79c0758 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Wed, 14 Feb 2024 14:17:42 +0500 Subject: [PATCH 1/5] Rename vid_c&t_69000.c to avoid & in the filename Apparently CMake chokes on it in a few cases --- src/video/CMakeLists.txt | 5 ++--- src/video/{vid_c&t_69000.c => vid_chips_69000.c} | 0 2 files changed, 2 insertions(+), 3 deletions(-) rename src/video/{vid_c&t_69000.c => vid_chips_69000.c} (100%) diff --git a/src/video/CMakeLists.txt b/src/video/CMakeLists.txt index d14120caf..dc0cac1ff 100644 --- a/src/video/CMakeLists.txt +++ b/src/video/CMakeLists.txt @@ -19,15 +19,14 @@ add_library(vid OBJECT agpgart.c video.c vid_table.c vid_cga.c vid_cga_comp.c vid_sigma.c vid_wy700.c vid_ega.c vid_ega_render.c vid_svga.c vid_8514a.c vid_svga_render.c vid_ddc.c vid_vga.c vid_ati_eeprom.c vid_ati18800.c vid_ati28800.c vid_ati_mach8.c vid_ati_mach64.c vid_ati68875_ramdac.c - vid_ati68860_ramdac.c vid_bt48x_ramdac.c + vid_ati68860_ramdac.c vid_bt48x_ramdac.c vid_chips_69000.c vid_av9194.c vid_icd2061.c vid_ics2494.c vid_ics2595.c vid_cl54xx.c vid_et3000.c vid_et4000.c vid_sc1148x_ramdac.c vid_sc1502x_ramdac.c vid_et4000w32.c vid_stg_ramdac.c vid_ht216.c vid_oak_oti.c vid_paradise.c vid_rtg310x.c vid_f82c425.c vid_ti_cf62011.c vid_tvga.c vid_tgui9440.c vid_tkd8001_ramdac.c vid_att20c49x_ramdac.c vid_s3.c vid_s3_virge.c vid_ibm_rgb528_ramdac.c vid_sdac_ramdac.c vid_ogc.c vid_mga.c vid_nga.c - vid_tvp3026_ramdac.c vid_att2xc498_ramdac.c vid_xga.c - vid_c&t_69000.c) + vid_tvp3026_ramdac.c vid_att2xc498_ramdac.c vid_xga.c) if(MGA2) target_compile_definitions(vid PRIVATE USE_MGA2) diff --git a/src/video/vid_c&t_69000.c b/src/video/vid_chips_69000.c similarity index 100% rename from src/video/vid_c&t_69000.c rename to src/video/vid_chips_69000.c From be27b6b6b22918adce315c8090be426339dce624 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Wed, 14 Feb 2024 14:18:33 +0500 Subject: [PATCH 2/5] Fix a forgotten change from D3D9 renderer removal It only affected the VNC renderer --- src/qt/qt_mainwindow.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_mainwindow.ui b/src/qt/qt_mainwindow.ui index ccdb5a9cf..08d8bbf63 100644 --- a/src/qt/qt_mainwindow.ui +++ b/src/qt/qt_mainwindow.ui @@ -845,7 +845,7 @@ VNC - 6 + 5 From 0ecbc24763d021ee35408117e57a188eccc408ac Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Wed, 14 Feb 2024 14:19:35 +0500 Subject: [PATCH 3/5] Improve the OPL4-ML devbranching --- CMakeLists.txt | 2 +- src/include/86box/midi.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80b56d619..f13e91791 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,11 +156,11 @@ cmake_dependent_option(LASERXT "VTech Laser XT" cmake_dependent_option(MGA2 "Matrox Millennium II and Productiva G100" ON "DEV_BRANCH" OFF) cmake_dependent_option(OLIVETTI "Olivetti M290" ON "DEV_BRANCH" OFF) cmake_dependent_option(OPEN_AT "OpenAT" ON "DEV_BRANCH" OFF) +cmake_dependent_option(OPL4ML "OPL4-ML daughterboard" ON "DEV_BRANCH" OFF) cmake_dependent_option(PAS16 "Pro Audio Spectrum 16" ON "DEV_BRANCH" OFF) cmake_dependent_option(SIO_DETECT "Super I/O Detection Helper" ON "DEV_BRANCH" OFF) cmake_dependent_option(VGAWONDER "ATI VGA Wonder (ATI-18800)" ON "DEV_BRANCH" OFF) cmake_dependent_option(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF) -cmake_dependent_option(OPL4ML "OPL4-ML daughterboard" ON "DEV_BRANCH" OFF) # Ditto but for Qt if(QT) diff --git a/src/include/86box/midi.h b/src/include/86box/midi.h index 4bc678817..7f7ad89ae 100644 --- a/src/include/86box/midi.h +++ b/src/include/86box/midi.h @@ -102,7 +102,9 @@ extern void midi_in_sysex(uint8_t *buffer, uint32_t len); #ifdef EMU_DEVICE_H extern const device_t rtmidi_output_device; extern const device_t rtmidi_input_device; +# if defined(DEV_BRANCH) && defined(USE_OPL4ML) extern const device_t opl4_midi_device; +# endif # ifdef USE_FLUIDSYNTH extern const device_t fluidsynth_device; # endif From 821f40deb1201cc9c82f6921da8a7bf057558998 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Wed, 14 Feb 2024 14:19:48 +0500 Subject: [PATCH 4/5] Fix the legacy Makefile --- src/win/Makefile.mingw | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index b889558ba..94b8af74a 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -73,6 +73,9 @@ ifeq ($(DEV_BUILD), y) ifndef OPEN_AT OPEN_AT := y endif + ifndef OPL4ML + OPL4ML := y + endif ifndef PAS16 PAS16 := y endif @@ -137,6 +140,9 @@ else ifndef OPEN_AT OPEN_AT := n endif + ifndef OPL4ML + OPL4ML := n + endif ifndef PAS16 PAS16 := n endif @@ -504,6 +510,11 @@ ifeq ($(DEV_BRANCH), y) OPTS += -DUSE_OPEN_AT endif + ifeq ($(OPL4ML), y) + OPTS += -DUSE_OPL4ML + DEVBROBJ += midi_opl4.o midi_opl4_yrw801.o + endif + ifeq ($(PAS16), y) OPTS += -DUSE_PAS16 DEVBROBJ += snd_pas16.o @@ -708,8 +719,6 @@ SNDOBJ := sound.o \ wave8580__ST.o wave8580_P_T.o wave8580_PS_.o \ wave8580_PST.o wave.o \ midi.o \ - midi_opl4.o \ - midi_opl4_yrw801.o \ snd_speaker.o \ snd_pssj.o \ snd_ps1.o \ @@ -744,10 +753,11 @@ VIDOBJ := agpgart.o video.o \ vid_vga.o \ vid_ati_eeprom.o \ vid_ati18800.o vid_ati28800.o \ - vid_ati_mach8.o \ + vid_ati_mach8.o \ vid_ati68875_ramdac.o \ vid_ati_mach64.o vid_ati68860_ramdac.o \ vid_bt48x_ramdac.o \ + vid_chips_69000.o \ vid_av9194.o vid_icd2061.o vid_ics2494.o vid_ics2595.o \ vid_cl54xx.o \ vid_et3000.o \ From 9b87dbe7bac0fedfeaec77e87b46595ce40c88ba Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Wed, 14 Feb 2024 14:48:58 +0500 Subject: [PATCH 5/5] Fix warnings in vid_chips_69000.c --- src/video/vid_chips_69000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/vid_chips_69000.c b/src/video/vid_chips_69000.c index b15546a69..deabc2b6a 100644 --- a/src/video/vid_chips_69000.c +++ b/src/video/vid_chips_69000.c @@ -1988,7 +1988,7 @@ chips_69000_writeb_mmio(uint32_t addr, uint8_t val, chips_69000_t* chips) case 0x600 ... 0x603: { chips->mem_regs_b[addr & 0xF] = val; - chips->mem_regs[addr >> 2] &= 0x80004040; + chips->mem_regs[(addr >> 2) & 0x3] &= 0x80004040; if (addr == 0x605 || addr == 0x607) chips_69000_interrupt(chips); break; @@ -1997,7 +1997,7 @@ chips_69000_writeb_mmio(uint32_t addr, uint8_t val, chips_69000_t* chips) case 0x604 ... 0x607: { chips->mem_regs_b[addr & 0xF] &= ~val; - chips->mem_regs[addr >> 2] &= 0x80004040; + chips->mem_regs[(addr >> 2) & 0x3] &= 0x80004040; if (addr == 0x605 || addr == 0x607) chips_69000_interrupt(chips); break;