From 6a6187e1045184de602096ea9e661e68cbc51d33 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 16 Feb 2022 11:14:38 +0100 Subject: [PATCH 01/17] Fixed the website button in the QT About box. --- src/qt/qt_mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 6d7fb6592..d78316cec 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -1433,7 +1433,7 @@ void MainWindow::on_actionAbout_86Box_triggered() msgBox.setInformativeText(tr("An emulator of old computers\n\nAuthors: Sarah Walker, Miran Grca, Fred N. van Kempen (waltje), SA1988, Tiseno100, reenigne, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information.")); msgBox.setWindowTitle("About 86Box"); msgBox.addButton("OK", QMessageBox::ButtonRole::AcceptRole); - auto webSiteButton = msgBox.addButton(EMU_SITE, QMessageBox::ButtonRole::HelpRole); + auto webSiteButton = msgBox.addButton(EMU_SITE_W, QMessageBox::ButtonRole::HelpRole); webSiteButton->connect(webSiteButton, &QPushButton::released, []() { QDesktopServices::openUrl(QUrl("https://" EMU_SITE)); From 9b0c50f91eabdb219586ed767e8ce4edb21cac5c Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 16 Feb 2022 11:18:18 +0100 Subject: [PATCH 02/17] Fixed the fix. --- src/qt/qt_mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index d78316cec..e1e3e6c3f 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -1433,7 +1433,7 @@ void MainWindow::on_actionAbout_86Box_triggered() msgBox.setInformativeText(tr("An emulator of old computers\n\nAuthors: Sarah Walker, Miran Grca, Fred N. van Kempen (waltje), SA1988, Tiseno100, reenigne, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information.")); msgBox.setWindowTitle("About 86Box"); msgBox.addButton("OK", QMessageBox::ButtonRole::AcceptRole); - auto webSiteButton = msgBox.addButton(EMU_SITE_W, QMessageBox::ButtonRole::HelpRole); + auto webSiteButton = msgBox.addButton(QString::fromWCharArray(EMU_SITE_W), QMessageBox::ButtonRole::HelpRole); webSiteButton->connect(webSiteButton, &QPushButton::released, []() { QDesktopServices::openUrl(QUrl("https://" EMU_SITE)); From e906886ddccd57b0a9b00906cb8065c01d18fcb2 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 16 Feb 2022 11:19:54 +0100 Subject: [PATCH 03/17] And fixed Win32 as well. --- src/win/win_about.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win/win_about.c b/src/win/win_about.c index d3d5157c2..c508c7b3c 100644 --- a/src/win/win_about.c +++ b/src/win/win_about.c @@ -39,7 +39,7 @@ AboutDialogCreate(HWND hwnd) int i; TASKDIALOGCONFIG tdconfig = {0}; TASKDIALOG_BUTTON tdbuttons[] = { - {IDOK, EMU_SITE}, + {IDOK, EMU_SITE_W}, {IDCANCEL, MAKEINTRESOURCE(IDS_2127)} }; From ac4a6ccb9c92cdd1a3be350af3382c0520be0e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Wed, 16 Feb 2022 11:34:04 +0100 Subject: [PATCH 04/17] Reverted the fix for the Qt about dialog as it wasn't broken in the first place --- src/qt/qt_mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index e1e3e6c3f..6d7fb6592 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -1433,7 +1433,7 @@ void MainWindow::on_actionAbout_86Box_triggered() msgBox.setInformativeText(tr("An emulator of old computers\n\nAuthors: Sarah Walker, Miran Grca, Fred N. van Kempen (waltje), SA1988, Tiseno100, reenigne, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information.")); msgBox.setWindowTitle("About 86Box"); msgBox.addButton("OK", QMessageBox::ButtonRole::AcceptRole); - auto webSiteButton = msgBox.addButton(QString::fromWCharArray(EMU_SITE_W), QMessageBox::ButtonRole::HelpRole); + auto webSiteButton = msgBox.addButton(EMU_SITE, QMessageBox::ButtonRole::HelpRole); webSiteButton->connect(webSiteButton, &QPushButton::released, []() { QDesktopServices::openUrl(QUrl("https://" EMU_SITE)); From 25623e0136889fc93c5c21f67bd0fb45e3f22a67 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Wed, 16 Feb 2022 13:29:27 -0300 Subject: [PATCH 05/17] Copy new system requirements from website --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f48bc59e..053420fa4 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ Features System requirements and recommendations --------------------------------------- * Intel Core 2 or AMD Athlon 64 processor -* Windows 7 Service Pack 1, Windows 8.1 or Windows 10 +* Windows version: Windows 7 Service Pack 1, Windows 8.1 or Windows 10 +* Linux version: Ubuntu 16.04, Debian 9.0 or other distributions from 2016 onwards * 4 GB of RAM Performance may vary depending on both host and guest configuration. Most emulation logic is executed in a single thread, therefore generally systems with better IPC (instructions per clock) should be able to emulate higher clock speeds. From 42e217c9054cfda44896b903490e786c5398f391 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Wed, 16 Feb 2022 13:31:32 -0300 Subject: [PATCH 06/17] Copy manager notice from website --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 053420fa4..8f75b27ea 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Performance may vary depending on both host and guest configuration. Most emulat It is also recommended to use a manager application with 86Box for easier handling of multiple virtual machines. * [WinBox for 86Box](https://github.com/86Box/WinBox-for-86Box) by Laci bá' * The new manager with improved new user experience; installer, automatic updates of emulator files and more. + * While development is suspended and the repository is archived, the latest version is fully functional. * [86Box Manager](https://github.com/86Box/86BoxManager) by [daviunic](https://github.com/daviunic) (Overdoze) * The traditional 86Box manager with simple interface. From d51d3cc4a7bc7b5eab1a37ed5e45c5cb76222d2f Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Wed, 16 Feb 2022 16:08:43 -0300 Subject: [PATCH 07/17] Managers are Windows only --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f75b27ea..3ec1994c4 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ System requirements and recommendations Performance may vary depending on both host and guest configuration. Most emulation logic is executed in a single thread, therefore generally systems with better IPC (instructions per clock) should be able to emulate higher clock speeds. -It is also recommended to use a manager application with 86Box for easier handling of multiple virtual machines. +It is also recommended to use a manager application (**Windows only**) with 86Box for easier handling of multiple virtual machines. * [WinBox for 86Box](https://github.com/86Box/WinBox-for-86Box) by Laci bá' * The new manager with improved new user experience; installer, automatic updates of emulator files and more. * While development is suspended and the repository is archived, the latest version is fully functional. From 4f9af2eb779ac540b8ca557acdb2182c4b036f27 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 17 Feb 2022 10:25:37 +0600 Subject: [PATCH 08/17] Xi2: Warp mouse cursor only on Xi2 thread --- src/qt/xinput2_mouse.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/qt/xinput2_mouse.cpp b/src/qt/xinput2_mouse.cpp index ff67b6a2c..b8af6f309 100644 --- a/src/qt/xinput2_mouse.cpp +++ b/src/qt/xinput2_mouse.cpp @@ -120,6 +120,14 @@ void xinput2_proc() prev_rel_coords[0] = relative_coords[0]; prev_rel_coords[1] = relative_coords[1]; prev_time = rawev->time; + if (!mouse_capture) break; + XWindowAttributes winattrib{}; + if (XGetWindowAttributes(disp, main_window->winId(), &winattrib)) { + auto globalPoint = main_window->mapToGlobal(QPoint(main_window->width() / 2, main_window->height() / 2)); + XWarpPointer(disp, XRootWindow(disp, XScreenNumberOfScreen(winattrib.screen)), XRootWindow(disp, XScreenNumberOfScreen(winattrib.screen)), 0, 0, 0, 0, globalPoint.x(), globalPoint.y()); + XFlush(disp); + } + } case XI_Motion: { if (XKeysymToKeycode(disp, XK_Home) == 69) { @@ -175,13 +183,6 @@ void xinput2_poll() { mouse_x = xi2_mouse_x; mouse_y = xi2_mouse_y; - XWindowAttributes winattrib{}; - if (XGetWindowAttributes(disp, main_window->winId(), &winattrib)) - { - auto globalPoint = main_window->mapToGlobal(QPoint(main_window->width() / 2, main_window->height() / 2)); - XWarpPointer(disp, XRootWindow(disp, XScreenNumberOfScreen(winattrib.screen)), XRootWindow(disp, XScreenNumberOfScreen(winattrib.screen)), 0, 0, 0, 0, globalPoint.x(), globalPoint.y()); - XFlush(disp); - } } xi2_mouse_x = 0; xi2_mouse_y = 0; From be3501cfe194e8417a7fe72d14d954432661b438 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 17 Feb 2022 11:45:42 +0600 Subject: [PATCH 09/17] qt: Avoid crashes on X11 at exit --- src/qt/qt_mainwindow.cpp | 4 ++++ src/qt/xinput2_mouse.cpp | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 6d7fb6592..986151b7c 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -445,6 +445,10 @@ void MainWindow::closeEvent(QCloseEvent *event) { } qt_nvr_save(); config_save(); +#ifdef __unix__ + extern void xinput2_exit(); + if (QApplication::platformName() == "xcb") xinput2_exit(); +#endif event->accept(); } diff --git a/src/qt/xinput2_mouse.cpp b/src/qt/xinput2_mouse.cpp index b8af6f309..0c31f6ca0 100644 --- a/src/qt/xinput2_mouse.cpp +++ b/src/qt/xinput2_mouse.cpp @@ -152,9 +152,12 @@ void xinput2_proc() void xinput2_exit() { - exitthread = true; - procThread->wait(5000); - procThread->terminate(); + if (!exitthread) + { + exitthread = true; + procThread->wait(5000); + procThread->terminate(); + } } void xinput2_init() From d87d0be2f8fde006da0fe1bb4608616fe6392d63 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 17 Feb 2022 11:51:24 +0600 Subject: [PATCH 10/17] qt: Uncapture mouse before exit --- src/qt/qt_platform.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 7c329c074..e676a1b92 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -337,6 +337,7 @@ extern int nvr_save(void); void plat_power_off(void) { + plat_mouse_capture(0); confirm_exit = 0; nvr_save(); config_save(); From 0ea4508ce3818de8d3acf9afe4abc6e2201f2af8 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 17 Feb 2022 14:45:52 +0600 Subject: [PATCH 11/17] qt: Fix media menu not appearing for non-HDD storage devices with certain IDE controllers --- src/qt/qt_machinestatus.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qt/qt_machinestatus.cpp b/src/qt/qt_machinestatus.cpp index 71be8c232..ea83b630b 100644 --- a/src/qt/qt_machinestatus.cpp +++ b/src/qt/qt_machinestatus.cpp @@ -259,8 +259,8 @@ void MachineStatus::iterateCDROM(const std::function &cb) { for (size_t i = 0; i < CDROM_NUM; i++) { /* Could be Internal or External IDE.. */ if ((cdrom[i].bus_type == CDROM_BUS_ATAPI) && - !hasIDE() && hdc_name != QStringLiteral("ide") && - hdc_name != QStringLiteral("xtide")) + !hasIDE() && hdc_name.left(3) != QStringLiteral("ide") && + hdc_name.left(5) != QStringLiteral("xtide")) continue; if ((cdrom[i].bus_type == CDROM_BUS_SCSI) && !hasSCSI() && (scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) && @@ -277,8 +277,8 @@ void MachineStatus::iterateZIP(const std::function &cb) { for (size_t i = 0; i < ZIP_NUM; i++) { /* Could be Internal or External IDE.. */ if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) && - !hasIDE() && hdc_name != QStringLiteral("ide") && - hdc_name != QStringLiteral("xtide")) + !hasIDE() && hdc_name.left(3) != QStringLiteral("ide") && + hdc_name.left(5) != QStringLiteral("xtide")) continue; if ((zip_drives[i].bus_type == ZIP_BUS_SCSI) && !hasSCSI() && (scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) && @@ -295,8 +295,8 @@ void MachineStatus::iterateMO(const std::function &cb) { for (size_t i = 0; i < MO_NUM; i++) { /* Could be Internal or External IDE.. */ if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && - !hasIDE() && hdc_name != QStringLiteral("ide") && - hdc_name != QStringLiteral("xtide")) + !hasIDE() && hdc_name.left(3) != QStringLiteral("ide") && + hdc_name.left(5) != QStringLiteral("xtide")) continue; if ((mo_drives[i].bus_type == MO_BUS_SCSI) && !hasSCSI() && (scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) && From 68d557188abd0b1395344e1efd323dab632826f7 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 17 Feb 2022 11:28:01 -0300 Subject: [PATCH 12/17] Bump version to 3.2.1 --- CMakeLists.txt | 2 +- src/include_make/86box/version.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 56a4d446a..baebe22b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ if(MUNT_EXTERNAL) endif() project(86Box - VERSION 3.2 + VERSION 3.2.1 DESCRIPTION "Emulator of x86-based systems" HOMEPAGE_URL "https://86box.net" LANGUAGES C CXX) diff --git a/src/include_make/86box/version.h b/src/include_make/86box/version.h index d2a0b2791..4e877ca24 100644 --- a/src/include_make/86box/version.h +++ b/src/include_make/86box/version.h @@ -20,12 +20,12 @@ #define EMU_NAME "86Box" #define EMU_NAME_W LSTR(EMU_NAME) -#define EMU_VERSION "3.2" +#define EMU_VERSION "3.2.1" #define EMU_VERSION_W LSTR(EMU_VERSION) -#define EMU_VERSION_EX "3.02" +#define EMU_VERSION_EX "3.21" #define EMU_VERSION_MAJ 3 -#define EMU_VERSION_MIN 0 -#define EMU_VERSION_PATCH 0 +#define EMU_VERSION_MIN 2 +#define EMU_VERSION_PATCH 1 #define EMU_BUILD_NUM 0 From 29b37d9f974c0db606b3716298626029bcf9b8b6 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 17 Feb 2022 11:29:35 -0300 Subject: [PATCH 13/17] Make SST flash not fatal on size mismatch, fixes Shuttle HOT-433A with old Intel flash files --- src/mem/sst_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem/sst_flash.c b/src/mem/sst_flash.c index 1de5e6e32..bcc3c3aa9 100644 --- a/src/mem/sst_flash.c +++ b/src/mem/sst_flash.c @@ -442,7 +442,7 @@ sst_init(const device_t *info) f = nvr_fopen(flash_path, "rb"); if (f) { if (fread(&(dev->array[0x00000]), 1, dev->size, f) != dev->size) - fatal("Less than %i bytes read from the SST Flash ROM file\n", dev->size); + pclog("Less than %i bytes read from the SST Flash ROM file\n", dev->size); fclose(f); } else dev->dirty = 1; /* It is by definition dirty on creation. */ From 6544bd9fa0018be5537c44f25c48a2afe342eb5c Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 17 Feb 2022 15:20:32 -0300 Subject: [PATCH 14/17] Jenkins: Exclude one /usr/share directory created by SDL --- .ci/AppImageBuilder.yml | 1 + .ci/build.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/AppImageBuilder.yml b/.ci/AppImageBuilder.yml index 317be2317..fb2482491 100644 --- a/.ci/AppImageBuilder.yml +++ b/.ci/AppImageBuilder.yml @@ -64,6 +64,7 @@ AppDir: - usr/lib/cmake - usr/lib/pkgconfig - usr/sbin + - usr/share/aclocal - usr/share/alsa - usr/share/apport - usr/share/bug diff --git a/.ci/build.sh b/.ci/build.sh index 5cd5f3baa..a791521f5 100644 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -232,7 +232,7 @@ else then pkgs="$pkgs build-essential" else - sudo dpkg --add-architecture $arch_deb + sudo dpkg --add-architecture "$arch_deb" pkgs="$pkgs crossbuild-essential-$arch_deb" fi From 10875e7c7c7ef7fa117e5f9bcba0112afd40e856 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 17 Feb 2022 15:22:11 -0300 Subject: [PATCH 15/17] snd_cs423x: Fix crash caused by initializing SBPro before ISAPnP --- src/sound/snd_cs423x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sound/snd_cs423x.c b/src/sound/snd_cs423x.c index d159182e4..e89efb434 100644 --- a/src/sound/snd_cs423x.c +++ b/src/sound/snd_cs423x.c @@ -776,9 +776,6 @@ cs423x_init(const device_t *info) if ((dev->eeprom_data[0] == 0x55) && (dev->eeprom_data[1] == 0xbb)) dev->eeprom = i2c_eeprom_init(i2c_gpio_get_bus(dev->i2c), 0x50, dev->eeprom_data, sizeof(dev->eeprom_data), 1); - /* Initialize ISAPnP. */ - dev->pnp_card = isapnp_add_card(NULL, 0, cs423x_pnp_config_changed, NULL, NULL, NULL, dev); - /* Initialize SBPro codec. The WSS codec is initialized later by cs423x_reset */ dev->sb = device_add(&sb_pro_compat_device); sound_set_cd_audio_filter(sbpro_filter_cd_audio, dev->sb); /* CD audio filter for the default context */ @@ -787,6 +784,9 @@ cs423x_init(const device_t *info) cs423x_reset(dev); sound_add_handler(cs423x_get_buffer, dev); + /* Initialize ISAPnP. */ + dev->pnp_card = isapnp_add_card(NULL, 0, cs423x_pnp_config_changed, NULL, NULL, NULL, dev); + return dev; } From 7696eea94eba9997d5644822732613a663a09fc3 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 17 Feb 2022 16:44:49 -0300 Subject: [PATCH 16/17] isapnp: Check if a card has a valid ROM before allowing it to be isolated --- src/device/isapnp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device/isapnp.c b/src/device/isapnp.c index 2b75969ce..18b11ba3d 100644 --- a/src/device/isapnp.c +++ b/src/device/isapnp.c @@ -268,7 +268,7 @@ isapnp_read_data(uint16_t addr, void *priv) case 0x01: /* Serial Isolation */ card = dev->first_card; while (card) { - if (card->enable && (card->state == PNP_STATE_ISOLATION)) + if (card->enable && card->rom && (card->state == PNP_STATE_ISOLATION)) break; card = card->next; } From 7f0c8fae5c43930c4171968eb9b3541f07531c39 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 17 Feb 2022 17:46:11 -0300 Subject: [PATCH 17/17] snd_cs423x: Actually fix the startup crash, caused by co-existing with VIA 686 SBPro compatibility --- src/chipset/via_pipc.c | 2 +- src/sound/snd_cs423x.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/chipset/via_pipc.c b/src/chipset/via_pipc.c index a9da704d8..1308d6cff 100644 --- a/src/chipset/via_pipc.c +++ b/src/chipset/via_pipc.c @@ -1577,7 +1577,7 @@ pipc_init(const device_t *info) dev->ac97 = device_add(&ac97_via_device); ac97_via_set_slot(dev->ac97, dev->slot, PCI_INTC); - dev->sb = device_add(&sb_pro_compat_device); + dev->sb = device_add_inst(&sb_pro_compat_device, 2); #ifndef VIA_PIPC_FM_EMULATION dev->sb->opl_enabled = 1; #endif diff --git a/src/sound/snd_cs423x.c b/src/sound/snd_cs423x.c index e89efb434..a7bd6cc17 100644 --- a/src/sound/snd_cs423x.c +++ b/src/sound/snd_cs423x.c @@ -708,7 +708,7 @@ cs423x_reset(void *priv) /* Reset PnP resource data, state and logical devices. */ dev->pnp_enable = 1; cs423x_pnp_enable(dev, 1, 1); - if (dev->pnp_card) + if (dev->pnp_card && dev->sb) isapnp_reset_card(dev->pnp_card); /* Reset SLAM. */ @@ -776,17 +776,17 @@ cs423x_init(const device_t *info) if ((dev->eeprom_data[0] == 0x55) && (dev->eeprom_data[1] == 0xbb)) dev->eeprom = i2c_eeprom_init(i2c_gpio_get_bus(dev->i2c), 0x50, dev->eeprom_data, sizeof(dev->eeprom_data), 1); + /* Initialize ISAPnP. */ + dev->pnp_card = isapnp_add_card(NULL, 0, cs423x_pnp_config_changed, NULL, NULL, NULL, dev); + /* Initialize SBPro codec. The WSS codec is initialized later by cs423x_reset */ - dev->sb = device_add(&sb_pro_compat_device); + 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 */ /* Initialize RAM, registers and WSS codec. */ cs423x_reset(dev); sound_add_handler(cs423x_get_buffer, dev); - /* Initialize ISAPnP. */ - dev->pnp_card = isapnp_add_card(NULL, 0, cs423x_pnp_config_changed, NULL, NULL, NULL, dev); - return dev; }