From e7d09a31a43a3364f08d2367aeb1c0979b514e89 Mon Sep 17 00:00:00 2001 From: klaas Date: Sat, 2 Apr 2022 15:38:37 +0019 Subject: [PATCH 01/78] linux blocks until a packet arrives which the rest of the code does not expect --- src/network/net_pcap.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/network/net_pcap.c b/src/network/net_pcap.c index 52573907b..114fb72b0 100644 --- a/src/network/net_pcap.c +++ b/src/network/net_pcap.c @@ -122,6 +122,9 @@ static const unsigned char *(*f_pcap_next)(void *,void *); static int (*f_pcap_sendpacket)(void *,const unsigned char *,int); static void (*f_pcap_close)(void *); +#ifdef __linux__ +static int (*f_pcap_setnonblock)(void*, int, char*); +#endif static dllimp_t pcap_imports[] = { { "pcap_lib_version", &f_pcap_lib_version }, { "pcap_findalldevs", &f_pcap_findalldevs }, @@ -132,6 +135,9 @@ static dllimp_t pcap_imports[] = { { "pcap_next", &f_pcap_next }, { "pcap_sendpacket", &f_pcap_sendpacket }, { "pcap_close", &f_pcap_close }, +#ifdef __linux__ + { "pcap_setnonblock", &f_pcap_setnonblock }, +#endif { NULL, NULL }, }; @@ -382,6 +388,11 @@ net_pcap_reset(const netcard_t *card, uint8_t *mac) pcap_log(" Unable to open device: %s!\n", network_host); return(-1); } +#ifdef __linux__ + if (f_pcap_setnonblock((void*)pcap, 1, errbuf) != 0) + pcap_log("PCAP: failed nonblock %s\n", errbuf); +#endif + pcap_log("PCAP: interface: %s\n", network_host); /* Create a MAC address based packet filter. */ From 093eddf5f13fcb26854989b4274d14a3b3eb073f Mon Sep 17 00:00:00 2001 From: klaas Date: Sat, 2 Apr 2022 15:46:19 +0019 Subject: [PATCH 02/78] network.c: fix log statement --- src/network/network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/network.c b/src/network/network.c index a02000372..6caf10393 100644 --- a/src/network/network.c +++ b/src/network/network.c @@ -541,12 +541,12 @@ network_reset(void) network_log("NETWORK: set up for %s, card='%s'\n", (network_type==NET_TYPE_SLIRP)?"SLiRP":"Pcap", - net_cards[network_card].name); + net_cards[network_card].device->name); /* Add the (new?) card to the I/O system. */ if (net_cards[network_card].device) { network_log("NETWORK: adding device '%s'\n", - net_cards[network_card].name); + net_cards[network_card].device->name); device_add(net_cards[network_card].device); } } From 3772aa312b019ca6c42bb93164beab7bcbbf3d8b Mon Sep 17 00:00:00 2001 From: klaas Date: Tue, 5 Apr 2022 10:29:26 +0019 Subject: [PATCH 03/78] Apply for Mac OS too. --- src/network/net_pcap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/net_pcap.c b/src/network/net_pcap.c index 114fb72b0..f3921a658 100644 --- a/src/network/net_pcap.c +++ b/src/network/net_pcap.c @@ -122,7 +122,7 @@ static const unsigned char *(*f_pcap_next)(void *,void *); static int (*f_pcap_sendpacket)(void *,const unsigned char *,int); static void (*f_pcap_close)(void *); -#ifdef __linux__ +#ifndef _WIN32 static int (*f_pcap_setnonblock)(void*, int, char*); #endif static dllimp_t pcap_imports[] = { @@ -135,7 +135,7 @@ static dllimp_t pcap_imports[] = { { "pcap_next", &f_pcap_next }, { "pcap_sendpacket", &f_pcap_sendpacket }, { "pcap_close", &f_pcap_close }, -#ifdef __linux__ +#ifndef _WIN32 { "pcap_setnonblock", &f_pcap_setnonblock }, #endif { NULL, NULL }, @@ -388,7 +388,7 @@ net_pcap_reset(const netcard_t *card, uint8_t *mac) pcap_log(" Unable to open device: %s!\n", network_host); return(-1); } -#ifdef __linux__ +#ifndef _WIN32 if (f_pcap_setnonblock((void*)pcap, 1, errbuf) != 0) pcap_log("PCAP: failed nonblock %s\n", errbuf); #endif From e5ab6a85648736cc310b177c8aa47f737324272c Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 8 Apr 2022 01:51:32 +0600 Subject: [PATCH 04/78] qt: Avoid reading absolute mouse input from cross-platform Qt code on Windows This ensures only RAWINPUT sends mouse input to the emulated machine on Windows. --- src/qt/qt_rendererstack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index c77e76474..88b2395d5 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -174,7 +174,7 @@ RendererStack::mouseMoveEvent(QMouseEvent *event) event->ignore(); return; } -#ifdef __APPLE__ +#if defined __APPLE__ || defined _WIN32 event->accept(); return; #else From a780d9a241093ff15b004c48623c93cb34c33ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 8 Apr 2022 00:58:38 +0200 Subject: [PATCH 05/78] Rewrite plat_init_rom_paths in Qt frontend --- src/86box.c | 5 +-- src/mac/CMakeLists.txt | 9 +++-- src/qt/qt_platform.cpp | 64 +++++++--------------------------- src/unix/CMakeLists.txt | 4 +++ src/{mac => unix}/macOSXGlue.h | 0 src/{mac => unix}/macOSXGlue.m | 0 src/unix/unix.c | 13 +++---- 7 files changed, 28 insertions(+), 67 deletions(-) rename src/{mac => unix}/macOSXGlue.h (100%) rename src/{mac => unix}/macOSXGlue.m (100%) diff --git a/src/86box.c b/src/86box.c index 4eae7ab02..5ba477fb4 100644 --- a/src/86box.c +++ b/src/86box.c @@ -37,7 +37,6 @@ #ifdef __APPLE__ #include #include -#include "mac/macOSXGlue.h" #ifdef __aarch64__ #include #endif @@ -650,9 +649,7 @@ usage: { char default_rom_path[1024] = { 0 }; -#if defined(__APPLE__) - getDefaultROMPath(default_rom_path); -#elif !defined(_WIN32) +#if !defined(_WIN32) && !defined(__APPLE__) appimage = getenv("APPIMAGE"); if (appimage && (appimage[0] != '\0')) { plat_get_dirname(default_rom_path, appimage); diff --git a/src/mac/CMakeLists.txt b/src/mac/CMakeLists.txt index ae3837f0e..2b71dd266 100644 --- a/src/mac/CMakeLists.txt +++ b/src/mac/CMakeLists.txt @@ -19,17 +19,16 @@ # Pick the bundle icon depending on the release channel if(RELEASE_BUILD) - set(APP_ICON_MACOSX icons/release/86Box.icns) + target_sources(86Box PRIVATE icons/release/86Box.icns) elseif(BETA_BUILD) - set(APP_ICON_MACOSX icons/beta/86Box.icns) + target_sources(86Box PRIVATE icons/beta/86Box.icns) elseif(ALPHA_BUILD) - set(APP_ICON_MACOSX icons/dev/86Box.icns) + target_sources(86Box PRIVATE icons/dev/86Box.icns) else() - set(APP_ICON_MACOSX icons/branch/86Box.icns) + target_sources(86Box PRIVATE icons/branch/86Box.icns) endif() target_link_libraries(86Box "-framework AppKit") -target_sources(86Box PRIVATE macOSXGlue.m ${APP_ICON_MACOSX}) # Make sure the icon is copied to the bundle set_source_files_properties(${APP_ICON_MACOSX} diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index e6e3256d3..1d709e3ac 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -589,59 +590,18 @@ plat_chdir(char *path) void plat_init_rom_paths() { -#if defined __APPLE__ - QDir::root().mkpath(QStringLiteral("%1/Documents/86Box/roms/").arg(QDir::homePath())); - add_rom_path(QStringLiteral("%1/Documents/86Box/roms/").arg(QDir::homePath()).toUtf8().constData()); -#elif !defined _WIN32 - if (getenv("XDG_DATA_HOME")) { - char xdg_rom_path[1024 + 1] = { 0 }; - strncpy(xdg_rom_path, getenv("XDG_DATA_HOME"), 1024); - plat_path_slash(xdg_rom_path); - strncat(xdg_rom_path, "86Box/", 1024); + auto paths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); - if (!plat_dir_check(xdg_rom_path)) - plat_dir_create(xdg_rom_path); - strcat(xdg_rom_path, "roms/"); +#ifdef _WIN32 + // HACK: The standard locations returned for GenericDataLocation include + // the EXE path and a `data` directory within it as the last two entries. - if (!plat_dir_check(xdg_rom_path)) - plat_dir_create(xdg_rom_path); - add_rom_path(xdg_rom_path); - } else { - char home_rom_path[1024] = { 0 }; - snprintf(home_rom_path, 1024, "%s/.local/share/86Box/", getenv("HOME") ? getenv("HOME") : QDir::homePath().toUtf8().constData()); - - if (!plat_dir_check(home_rom_path)) - plat_dir_create(home_rom_path); - strcat(home_rom_path, "roms/"); - - if (!plat_dir_check(home_rom_path)) - plat_dir_create(home_rom_path); - add_rom_path(home_rom_path); - } - if (getenv("XDG_DATA_DIRS")) { - char* xdg_rom_paths = strdup(getenv("XDG_DATA_DIRS")); - char* xdg_rom_paths_orig = xdg_rom_paths; - char* cur_xdg_rom_path = NULL; - if (xdg_rom_paths) { - while (xdg_rom_paths[strlen(xdg_rom_paths) - 1] == ':') { - xdg_rom_paths[strlen(xdg_rom_paths) - 1] = '\0'; - } - QStringList path_list = QString(xdg_rom_paths).split(":"); - for (auto& cur_path : path_list) { - if (cur_path.right(1) != '/') - cur_path.push_back('/'); - add_rom_path((cur_path + "86Box/roms").toUtf8().constData()); - } - } - free(xdg_rom_paths_orig); - } else { - add_rom_path("/usr/local/share/86Box/roms/"); - add_rom_path("/usr/share/86Box/roms/"); - } -#elif _WIN32 - auto appDataDir = QDir(qEnvironmentVariable("LOCALAPPDATA")); - appDataDir.mkdir("86Box"); - appDataDir.mkdir("86Box/roms"); - add_rom_path((appDataDir.path().replace("\\","/") + "/86Box/roms").toUtf8().constData()); + // Remove the entries as we don't need them. + paths.removeLast(); + paths.removeLast(); #endif + + for (auto& path : paths) { + add_rom_path(QDir(path).filePath("86Box/roms").toUtf8().constData()); + } } diff --git a/src/unix/CMakeLists.txt b/src/unix/CMakeLists.txt index 1712288d2..6d1c01a34 100644 --- a/src/unix/CMakeLists.txt +++ b/src/unix/CMakeLists.txt @@ -28,3 +28,7 @@ target_link_libraries(86Box Threads::Threads) add_library(ui OBJECT unix_sdl.c unix_cdrom.c) target_compile_definitions(ui PUBLIC _FILE_OFFSET_BITS=64) target_link_libraries(ui ${CMAKE_DL_LIBS}) + +if(APPLE) + target_sources(plat PRIVATE macOSXGlue.m) +endif() diff --git a/src/mac/macOSXGlue.h b/src/unix/macOSXGlue.h similarity index 100% rename from src/mac/macOSXGlue.h rename to src/unix/macOSXGlue.h diff --git a/src/mac/macOSXGlue.m b/src/unix/macOSXGlue.m similarity index 100% rename from src/mac/macOSXGlue.m rename to src/unix/macOSXGlue.m diff --git a/src/unix/unix.c b/src/unix/unix.c index 5f6429b89..8854be1a8 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -36,6 +36,10 @@ #include <86box/ui.h> #include <86box/gdbstub.h> +#ifdef __APPLE__ +#include "macOSXGlue.h" +#endif + static int first_use = 1; static uint64_t StartingTime; static uint64_t Frequency; @@ -797,12 +801,9 @@ plat_init_rom_paths() add_rom_path("/usr/share/86Box/roms/"); } #else - char home_rom_path[1024] = { '\0' }; - snprintf(home_rom_path, 1024, "%s/Documents/86Box/", getenv("HOME") ? getenv("HOME") : getpwuid(getuid())->pw_dir); - plat_dir_create(home_rom_path); - strcat(home_rom_path, "roms/"); - plat_dir_create(home_rom_path); - add_rom_path(home_rom_path); + char default_rom_path[1024] = { '\0 '}; + getDefaultROMPath(default_rom_path); + add_rom_path(default_rom_path); #endif } From 3449a173ae60d231ba5247a89d93613e1defa73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 8 Apr 2022 00:46:30 +0200 Subject: [PATCH 06/78] Move ROM search path code to `rom.c`, rewrite `rom_fopen` --- src/86box.c | 58 +++---------------- src/include/86box/rom.h | 4 +- src/mem/rom.c | 122 +++++++++++++++++----------------------- src/qt/qt_platform.cpp | 2 +- src/unix/unix.c | 12 ++-- src/win/win.c | 2 +- 6 files changed, 71 insertions(+), 129 deletions(-) diff --git a/src/86box.c b/src/86box.c index 5ba477fb4..696f65a5d 100644 --- a/src/86box.c +++ b/src/86box.c @@ -384,48 +384,6 @@ pc_log(const char *fmt, ...) #define pc_log(fmt, ...) #endif -void -add_rom_path(const char* path) -{ - static char cwd[1024]; - memset(cwd, 0x00, sizeof(cwd)); - rom_path_t* cur_rom_path = &rom_paths; - while (cur_rom_path->next != NULL) { - cur_rom_path = cur_rom_path->next; - } - if (!plat_path_abs((char*)path)) { - /* - * This looks like a relative path. - * - * Add it to the current working directory - * to convert it (back) to an absolute path. - */ - plat_getcwd(cwd, 1024); - plat_path_slash(cwd); - snprintf(cur_rom_path->rom_path, 1024, "%s%s%c", cwd, path, 0); - } - else { - /* - * The user-provided path seems like an - * absolute path, so just use that. - */ - strncpy(cur_rom_path->rom_path, path, 1024); - } - plat_path_slash(cur_rom_path->rom_path); - cur_rom_path->next = calloc(1, sizeof(rom_path_t)); -} - -// Copied over from Unix code, which in turn is lifted from musl. Needed for parsing XDG_DATA_DIRS. -static char *local_strsep(char **str, const char *sep) -{ - char *s = *str, *end; - if (!s) return NULL; - end = s + strcspn(s, sep); - if (*end) *end++ = 0; - else end = 0; - *str = end; - return s; -} /* * Perform initial startup of the PC. @@ -539,7 +497,7 @@ usage: if ((c+1) == argc) goto usage; strcpy(path2, argv[++c]); - add_rom_path(path2); + rom_add_path(path2); } else if (!strcasecmp(argv[c], "--config") || !strcasecmp(argv[c], "-C")) { if ((c+1) == argc) goto usage; @@ -641,7 +599,7 @@ usage: plat_path_slash(vmrppath); strcat(vmrppath, "roms"); plat_path_slash(vmrppath); - add_rom_path(vmrppath); + rom_add_path(vmrppath); if (path2[0] == '\0') { strcpy(path2, vmrppath); } @@ -650,13 +608,13 @@ usage: { char default_rom_path[1024] = { 0 }; #if !defined(_WIN32) && !defined(__APPLE__) - appimage = getenv("APPIMAGE"); - if (appimage && (appimage[0] != '\0')) { + appimage = getenv("APPIMAGE"); + if (appimage && (appimage[0] != '\0')) { plat_get_dirname(default_rom_path, appimage); plat_path_slash(default_rom_path); strcat(default_rom_path, "roms"); plat_path_slash(default_rom_path); - } + } #endif if (default_rom_path[0] == '\0') { plat_getcwd(default_rom_path, 1024); @@ -664,11 +622,11 @@ usage: snprintf(default_rom_path, 1024, "%s%s%c", default_rom_path, "roms", 0); plat_path_slash(default_rom_path); } - add_rom_path(default_rom_path); + rom_add_path(default_rom_path); if (path2[0] == '\0') { strcpy(path2, default_rom_path); } - } + } plat_init_rom_paths(); @@ -771,7 +729,7 @@ usage: if (rom_paths.next) { rom_path_t* cur_rom_path = &rom_paths; while (cur_rom_path->next) { - pclog("# ROM path: %s\n", cur_rom_path->rom_path); + pclog("# ROM path: %s\n", cur_rom_path->path); cur_rom_path = cur_rom_path->next; } } diff --git a/src/include/86box/rom.h b/src/include/86box/rom.h index 04fe94422..30c7c0561 100644 --- a/src/include/86box/rom.h +++ b/src/include/86box/rom.h @@ -42,13 +42,13 @@ typedef struct { typedef struct rom_path_t { - char rom_path[1024]; + char path[1024]; struct rom_path_t* next; } rom_path_t; extern rom_path_t rom_paths; -extern void add_rom_path(const char* path); +extern void rom_add_path(const char* path); extern uint8_t rom_read(uint32_t addr, void *p); extern uint16_t rom_readw(uint32_t addr, void *p); diff --git a/src/mem/rom.c b/src/mem/rom.c index 3dcbfe568..fda529181 100644 --- a/src/mem/rom.c +++ b/src/mem/rom.c @@ -57,47 +57,55 @@ rom_log(const char *fmt, ...) #define rom_log(fmt, ...) #endif +void +rom_add_path(const char* path) +{ + char cwd[1024] = { 0 }; + + // Iterate to the end of the list. + rom_path_t* rom_path = &rom_paths; + while (rom_path->next != NULL) { + rom_path = rom_path->next; + } + + // Allocate the new entry. + rom_path = rom_path->next = calloc(1, sizeof(rom_path_t)); + + // Save the path, turning it into absolute if needed. + if (!plat_path_abs((char*) path)) { + plat_getcwd(cwd, 1024); + plat_path_slash(cwd); + snprintf(rom_path->path, 1024, "%s%s%c", cwd, path, 0); + } else { + strncpy(rom_path->path, path, 1024); + } + + // Ensure the path ends with a separator. + plat_path_slash(rom_path->path); +} + FILE * rom_fopen(char *fn, char *mode) { char temp[1024]; - char *fn2; + rom_path_t *rom_path = &rom_paths; + FILE *fp; - if ((strstr(fn, "roms/") == fn) || (strstr(fn, "roms\\") == fn)) { - /* Relative path */ - fn2 = (char *) malloc(strlen(fn) + 1); - memcpy(fn2, fn, strlen(fn) + 1); + if (strstr(fn, "roms/") == fn) { + /* Relative path */ + do { + plat_append_filename(temp, rom_path->path, fn + 5); - if (rom_paths.next) { - rom_path_t* cur_rom_path = &rom_paths; - memset(fn2, 0x00, strlen(fn) + 1); - memcpy(fn2, &(fn[5]), strlen(fn) - 4); - - while (cur_rom_path->next) { - memset(temp, 0, sizeof(temp)); - plat_append_filename(temp, cur_rom_path->rom_path, fn2); - if (rom_present(temp)) { - break; + if (fp = plat_fopen(temp, mode)) { + return fp; } - cur_rom_path = cur_rom_path->next; - } - } else { - /* Make sure to make it a backslash, just in case there's malformed - code calling us that assumes Windows. */ - if (fn2[4] == '\\') - fn2[4] = '/'; + } while(rom_path = rom_path->next); - plat_append_filename(temp, exe_path, fn2); - } - - free(fn2); - fn2 = NULL; - - return(plat_fopen(temp, mode)); + return fp; } else { - /* Absolute path */ - return(plat_fopen(fn, mode)); + /* Absolute path */ + return plat_fopen(fn, mode); } } @@ -105,54 +113,30 @@ rom_fopen(char *fn, char *mode) int rom_getfile(char *fn, char *s, int size) { - char temp[1024] = {'\0'}; - char *fn2; - int retval = 0; + char temp[1024]; + rom_path_t *rom_path = &rom_paths; - if ((strstr(fn, "roms/") == fn) || (strstr(fn, "roms\\") == fn)) { - /* Relative path */ - fn2 = (char *) malloc(strlen(fn) + 1); - memcpy(fn2, fn, strlen(fn) + 1); + if (strstr(fn, "roms/") == fn) { + /* Relative path */ + do { + plat_append_filename(temp, rom_path->path, fn + 5); - if (rom_paths.next) { - rom_path_t* cur_rom_path = &rom_paths; - memset(fn2, 0x00, strlen(fn) + 1); - memcpy(fn2, &(fn[5]), strlen(fn) - 4); - - while (cur_rom_path->next) { - memset(temp, 0, sizeof(temp)); - plat_append_filename(temp, cur_rom_path->rom_path, fn2); if (rom_present(temp)) { strncpy(s, temp, size); - retval = 1; - break; + return 1; } - cur_rom_path = cur_rom_path->next; - } - } else { - /* Make sure to make it a backslash, just in case there's malformed - code calling us that assumes Windows. */ - if (fn2[4] == '\\') - fn2[4] = '/'; + } while(rom_path = rom_path->next); - plat_append_filename(temp, exe_path, fn2); - if (rom_present(temp)) { - strncpy(s, temp, size); - retval = 1; - } - } - - free(fn2); - fn2 = NULL; + return 0; } else { /* Absolute path */ if (rom_present(fn)) { strncpy(s, fn, size); - retval = 1; + return 1; } + + return 0; } - - return(retval); } @@ -163,8 +147,8 @@ rom_present(char *fn) f = rom_fopen(fn, "rb"); if (f != NULL) { - (void)fclose(f); - return(1); + (void)fclose(f); + return(1); } return(0); diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 1d709e3ac..af3d2b9e8 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -602,6 +602,6 @@ plat_init_rom_paths() #endif for (auto& path : paths) { - add_rom_path(QDir(path).filePath("86Box/roms").toUtf8().constData()); + rom_add_path(QDir(path).filePath("86Box/roms").toUtf8().constData()); } } diff --git a/src/unix/unix.c b/src/unix/unix.c index 8854be1a8..36187d44a 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -766,7 +766,7 @@ plat_init_rom_paths() if (!plat_dir_check(xdg_rom_path)) plat_dir_create(xdg_rom_path); - add_rom_path(xdg_rom_path); + rom_add_path(xdg_rom_path); } else { char home_rom_path[1024] = { 0 }; snprintf(home_rom_path, 1024, "%s/.local/share/86Box/", getenv("HOME") ? getenv("HOME") : getpwuid(getuid())->pw_dir); @@ -777,7 +777,7 @@ plat_init_rom_paths() if (!plat_dir_check(home_rom_path)) plat_dir_create(home_rom_path); - add_rom_path(home_rom_path); + rom_add_path(home_rom_path); } if (getenv("XDG_DATA_DIRS")) { char* xdg_rom_paths = strdup(getenv("XDG_DATA_DIRS")); @@ -792,18 +792,18 @@ plat_init_rom_paths() strcat(real_xdg_rom_path, cur_xdg_rom_path); plat_path_slash(real_xdg_rom_path); strcat(real_xdg_rom_path, "86Box/roms/"); - add_rom_path(real_xdg_rom_path); + rom_add_path(real_xdg_rom_path); } } free(xdg_rom_paths_orig); } else { - add_rom_path("/usr/local/share/86Box/roms/"); - add_rom_path("/usr/share/86Box/roms/"); + rom_add_path("/usr/local/share/86Box/roms/"); + rom_add_path("/usr/share/86Box/roms/"); } #else char default_rom_path[1024] = { '\0 '}; getDefaultROMPath(default_rom_path); - add_rom_path(default_rom_path); + rom_path_add(default_rom_path); #endif } diff --git a/src/win/win.c b/src/win/win.c index 06db20bad..b655b58cf 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -932,7 +932,7 @@ plat_init_rom_paths() CreateDirectoryW(appdata_dir, NULL); wcscat(appdata_dir, "\\"); c16stombs(appdata_dir_a, appdata_dir, 1024); - add_rom_path(appdata_dir_a); + rom_add_path(appdata_dir_a); } } From db2b868909d63e79579ce10d51b6780563cebfcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 8 Apr 2022 01:33:49 +0200 Subject: [PATCH 07/78] Refactor the ROM set command line options --- src/86box.c | 76 +++++++++++++++++++-------------------------------- src/mem/rom.c | 16 +++++++---- 2 files changed, 38 insertions(+), 54 deletions(-) diff --git a/src/86box.c b/src/86box.c index 696f65a5d..3a9b199c0 100644 --- a/src/86box.c +++ b/src/86box.c @@ -395,12 +395,12 @@ pc_log(const char *fmt, ...) int pc_init(int argc, char *argv[]) { - char path[2048], path2[2048]; + char *ppath = NULL, *rpath = NULL; char *cfg = NULL, *p; #if !defined(__APPLE__) && !defined(_WIN32) char *appimage; #endif - char temp[128]; + char temp[2048]; struct tm *info; time_t now; int c, vmrp = 0; @@ -424,9 +424,6 @@ pc_init(int argc, char *argv[]) plat_getcwd(usr_path, sizeof(usr_path) - 1); plat_getcwd(rom_path, sizeof(rom_path) - 1); - memset(path, 0x00, sizeof(path)); - memset(path2, 0x00, sizeof(path)); - for (c=1; cnext != NULL) { - rom_path = rom_path->next; - } - // Allocate the new entry. - rom_path = rom_path->next = calloc(1, sizeof(rom_path_t)); + if (rom_paths.path[0] != '\0') + { + // Iterate to the end of the list. + while (rom_path->next != NULL) { + rom_path = rom_path->next; + } + + // Allocate the new entry. + rom_path = rom_path->next = calloc(1, sizeof(rom_path_t)); + } // Save the path, turning it into absolute if needed. if (!plat_path_abs((char*) path)) { From 37b478d25ea3c3fb36b3bfe17ed2a3c47c4a352d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 8 Apr 2022 01:49:04 +0200 Subject: [PATCH 08/78] Fix up `exe_path` when running as AppImage --- src/86box.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/86box.c b/src/86box.c index 3a9b199c0..63f4f3c52 100644 --- a/src/86box.c +++ b/src/86box.c @@ -413,6 +413,14 @@ pc_init(int argc, char *argv[]) p = plat_get_filename(exe_path); *p = '\0'; +#if !defined(_WIN32) && !defined(__APPLE__) + /* Grab the actual path if we are an AppImage. */ + appimage = getenv("APPIMAGE"); + if (appimage && (appimage[0] != '\0')) { + plat_get_dirname(exe_path, appimage); + } +#endif + /* * Get the current working directory. * @@ -591,21 +599,10 @@ usage: // Add the VM-local ROM path. plat_append_filename(temp, usr_path, "roms"); - plat_path_slash(temp); rom_add_path(temp); // Add the standard ROM path in the same directory as the executable. -#if !defined(_WIN32) && !defined(__APPLE__) - appimage = getenv("APPIMAGE"); - if (appimage && (appimage[0] != '\0')) { - plat_append_filename(temp, appimage, "roms"); - } else { -#endif - plat_append_filename(temp, exe_path, "roms"); -#if !defined(_WIN32) && !defined(__APPLE__) - } -#endif - + plat_append_filename(temp, exe_path, "roms"); rom_add_path(temp); plat_init_rom_paths(); From 8e65036b71f3d233d2d4ff79de6824b46c2f928f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 8 Apr 2022 02:18:28 +0200 Subject: [PATCH 09/78] Fix ROM path logging at startup --- src/86box.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/86box.c b/src/86box.c index 63f4f3c52..58a57dff3 100644 --- a/src/86box.c +++ b/src/86box.c @@ -407,6 +407,7 @@ pc_init(int argc, char *argv[]) int ng = 0, lvmp = 0; uint32_t *uid, *shwnd; uint32_t lang_init = 0; + rom_path_t *rom_path = &rom_path; /* Grab the executable's full path. */ plat_get_exe_name(exe_path, sizeof(exe_path)-1); @@ -703,19 +704,10 @@ usage: pclog("# VM: %s\n#\n", vm_name); pclog("# Emulator path: %s\n", exe_path); pclog("# Userfiles path: %s\n", usr_path); - if (rom_paths.next) { - rom_path_t* cur_rom_path = &rom_paths; - while (cur_rom_path->next) { - pclog("# ROM path: %s\n", cur_rom_path->path); - cur_rom_path = cur_rom_path->next; - } - } - else -#ifndef _WIN32 - pclog("# ROM path: %sroms/\n", exe_path); -#else - pclog("# ROM path: %sroms\\\n", exe_path); -#endif + do { + pclog("# ROM path: %s\n", rom_path->path); + } while (rom_path = rom_path->next); + pclog("# Configuration file: %s\n#\n\n", cfg_path); /* * We are about to read the configuration file, which MAY From 2bd9884a32124c1d830f33bad0c600fb699bb15c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 8 Apr 2022 02:22:13 +0200 Subject: [PATCH 10/78] Fix ROM path logging, take two --- src/86box.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/86box.c b/src/86box.c index 58a57dff3..b1c969509 100644 --- a/src/86box.c +++ b/src/86box.c @@ -407,7 +407,6 @@ pc_init(int argc, char *argv[]) int ng = 0, lvmp = 0; uint32_t *uid, *shwnd; uint32_t lang_init = 0; - rom_path_t *rom_path = &rom_path; /* Grab the executable's full path. */ plat_get_exe_name(exe_path, sizeof(exe_path)-1); @@ -704,9 +703,9 @@ usage: pclog("# VM: %s\n#\n", vm_name); pclog("# Emulator path: %s\n", exe_path); pclog("# Userfiles path: %s\n", usr_path); - do { + for(rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { pclog("# ROM path: %s\n", rom_path->path); - } while (rom_path = rom_path->next); + } pclog("# Configuration file: %s\n#\n\n", cfg_path); /* From ac77a2161146fd26a2aecdc4b483b4883f58ddb0 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 19 Mar 2022 00:44:42 +0000 Subject: [PATCH 11/78] cmake: Fix Qt 6 plugin installation on macOS Run find_package to import the CMake rules for the various plugins, as install_qt5_plugin didn't work for me on Qt 6 otherwise, and install the macOS style and icon plugins as well so that the widget style and icons work correctly on Qt 6. ${_qt_plugin_dir} doesn't seem to get set by anything and install_qt5_plugin hardcodes the PlugIns path, so hardcode that in qt.conf as well. Additionally, adjust the Qt library folder to take into account the major version being used. --- src/qt/CMakeLists.txt | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index a62032537..91891087b 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -22,6 +22,14 @@ endif() find_package(Threads REQUIRED) find_package(Qt${QT_MAJOR} COMPONENTS Core Widgets Network OpenGL REQUIRED) find_package(Qt${QT_MAJOR}LinguistTools REQUIRED) +# TODO: Is this the correct way to do this, and is it required on any +# other platforms or with Qt 5? +if(APPLE AND USE_QT6) + find_package(Qt6Gui/Qt6QCocoaIntegrationPlugin REQUIRED) + find_package(Qt6Widgets/Qt6QMacStylePlugin REQUIRED) + find_package(Qt6Gui/Qt6QICOPlugin REQUIRED) + find_package(Qt6Gui/Qt6QICNSPlugin REQUIRED) +endif() add_library(plat STATIC qt.c @@ -232,17 +240,13 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE) set(INSTALL_CMAKE_DIR "${prefix}/Resources") # using the install_qt5_plugin to add Qt plugins into the macOS app bundle - if (USE_QT6) - install_qt5_plugin("Qt6::QCocoaIntegrationPlugin" QT_PLUGINS ${prefix}) - else() - install_qt5_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS ${prefix}) - install_qt5_plugin("Qt5::QMacStylePlugin" QT_PLUGINS ${prefix}) - install_qt5_plugin("Qt5::QICOPlugin" QT_PLUGINS ${prefix}) - install_qt5_plugin("Qt5::QICNSPlugin" QT_PLUGINS ${prefix}) - endif() + install_qt5_plugin("Qt${QT_MAJOR}::QCocoaIntegrationPlugin" QT_PLUGINS ${prefix}) + install_qt5_plugin("Qt${QT_MAJOR}::QMacStylePlugin" QT_PLUGINS ${prefix}) + install_qt5_plugin("Qt${QT_MAJOR}::QICOPlugin" QT_PLUGINS ${prefix}) + install_qt5_plugin("Qt${QT_MAJOR}::QICNSPlugin" QT_PLUGINS ${prefix}) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" - "[Paths]\nPlugins = ${_qt_plugin_dir}\n") + "[Paths]\nPlugins = PlugIns\n") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" DESTINATION "${INSTALL_CMAKE_DIR}") @@ -253,8 +257,8 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE) endforeach() endif() - # Append Qt's lib folder which is two levels above Qt5Widgets_DIR - list(APPEND DIRS "${Qt5Widgets_DIR}/../..") + # Append Qt's lib folder which is two levels above Qt*Widgets_DIR + list(APPEND DIRS "${Qt${QT_MAJOR}Widgets_DIR}/../..") include(InstallRequiredSystemLibraries) From 9c6001dabb7b75bf18d5b678a2dbb3a6c0a38da9 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 19 Mar 2022 23:06:17 +0000 Subject: [PATCH 12/78] qt: Fix Qt 6 modifier key handling on macOS Per QTBUG-69608 (https://bugreports.qt.io/browse/QTBUG-69608), QKeyEvent::nativeVirtualKey() returns 0 on Qt 6 (and possibly some versions of Qt 5) for keyboard modifier events. Despite being closed, the bug doesn't appear to have been fixed, or perhaps was fixed and then regressed again. Detect this case and handle the events manually by keeping track of the active modifier keys and using QKeyEvent::nativeModifiers() and the platform-specific modifier values. Caps Lock requires some special handling and doesn't get discrete press/release events, at least with the Qt input system; see the code for details. It's possible some other toggle modifiers like Scroll Lock will need special handling along these lines too. Fix #2211. --- src/qt/qt_mainwindow.cpp | 80 +++++++++++++++++++++++++++++++++++++--- src/qt/qt_mainwindow.hpp | 5 +++ 2 files changed, 80 insertions(+), 5 deletions(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index fe249874b..ca3cf1a2e 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -82,6 +82,14 @@ extern "C" { #undef KeyRelease #endif +#ifdef Q_OS_MACOS +// The namespace is required to avoid clashing typedefs; we only use this +// header for its #defines anyway. +namespace IOKit { + #include +} +#endif + #ifdef __HAIKU__ #include #include @@ -1215,7 +1223,7 @@ uint16_t x11_keycode_to_keysym(uint32_t keycode) uint16_t finalkeycode = 0; #if defined(Q_OS_WINDOWS) finalkeycode = (keycode & 0xFFFF); -#elif defined(__APPLE__) +#elif defined(Q_OS_MACOS) finalkeycode = darwin_to_xt[keycode]; #elif defined(__HAIKU__) finalkeycode = be_to_xt[keycode]; @@ -1252,6 +1260,68 @@ uint16_t x11_keycode_to_keysym(uint32_t keycode) return finalkeycode; } +#ifdef Q_OS_MACOS +// These modifiers are listed as "device-dependent" in IOLLEvent.h, but +// that's followed up with "(really?)". It's the only way to distinguish +// left and right modifiers with Qt 6 on macOS, so let's just roll with it. +static std::unordered_map mac_modifiers_to_xt = { + {NX_DEVICELCTLKEYMASK, 0x1D}, + {NX_DEVICELSHIFTKEYMASK, 0x2A}, + {NX_DEVICERSHIFTKEYMASK, 0x36}, + {NX_DEVICELCMDKEYMASK, 0x15B}, + {NX_DEVICERCMDKEYMASK, 0x15C}, + {NX_DEVICELALTKEYMASK, 0x38}, + {NX_DEVICERALTKEYMASK, 0x138}, + {NX_DEVICE_ALPHASHIFT_STATELESS_MASK, 0x3A}, + {NX_DEVICERCTLKEYMASK, 0x11D}, +}; + +void MainWindow::processMacKeyboardInput(bool down, const QKeyEvent* event) { + // Per QTBUG-69608 (https://bugreports.qt.io/browse/QTBUG-69608), + // QKeyEvents QKeyEvents for presses/releases of modifiers on macOS give + // nativeVirtualKey() == 0 (at least in Qt 6). Handle this by manually + // processing the nativeModifiers(). We need to check whether the key() is + // a known modifier because because kVK_ANSI_A is also 0, so the + // nativeVirtualKey() == 0 condition is ambiguous... + if (event->nativeVirtualKey() == 0 + && (event->key() == Qt::Key_Shift + || event->key() == Qt::Key_Control + || event->key() == Qt::Key_Meta + || event->key() == Qt::Key_Alt + || event->key() == Qt::Key_AltGr + || event->key() == Qt::Key_CapsLock)) { + // We only process one modifier at a time since events from Qt seem to + // always be non-coalesced (NX_NONCOALESCEDMASK is always set). + uint32_t changed_modifiers = last_modifiers ^ event->nativeModifiers(); + for (auto const& pair : mac_modifiers_to_xt) { + if (changed_modifiers & pair.first) { + last_modifiers ^= pair.first; + keyboard_input(down, pair.second); + return; + } + } + + // Caps Lock seems to be delivered as a single key press event when + // enabled and a single key release event when disabled, so we can't + // detect Caps Lock being held down; just send an infinitesimally-long + // press and release as a compromise. + // + // The event also doesn't get delivered if you turn Caps Lock off after + // turning it on when the window isn't focused. Doing better than this + // probably requires bypassing Qt input processing. + // + // It's possible that other lock keys get delivered in this way, but + // standard Apple keyboards don't have them, so this is untested. + if (event->key() == Qt::Key_CapsLock) { + keyboard_input(1, 0x3A); + keyboard_input(0, 0x3A); + } + } else { + keyboard_input(down, x11_keycode_to_keysym(event->nativeVirtualKey())); + } +} +#endif + void MainWindow::on_actionFullscreen_triggered() { if (video_fullscreen > 0) { showNormal(); @@ -1370,8 +1440,8 @@ void MainWindow::keyPressEvent(QKeyEvent* event) { if (send_keyboard_input && !(kbd_req_capture && !mouse_capture && !video_fullscreen)) { -#ifdef __APPLE__ - keyboard_input(1, x11_keycode_to_keysym(event->nativeVirtualKey())); +#ifdef Q_OS_MACOS + processMacKeyboardInput(true, event); #else keyboard_input(1, x11_keycode_to_keysym(event->nativeScanCode())); #endif @@ -1397,8 +1467,8 @@ void MainWindow::keyReleaseEvent(QKeyEvent* event) if (!send_keyboard_input) return; -#ifdef __APPLE__ - keyboard_input(0, x11_keycode_to_keysym(event->nativeVirtualKey())); +#ifdef Q_OS_MACOS + processMacKeyboardInput(false, event); #else keyboard_input(0, x11_keycode_to_keysym(event->nativeScanCode())); #endif diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index 5b155079c..84d08f8ed 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -118,6 +118,11 @@ private: std::unique_ptr status; std::shared_ptr mm; +#ifdef Q_OS_MACOS + uint32_t last_modifiers = 0; + void processMacKeyboardInput(bool down, const QKeyEvent* event); +#endif + /* If main window should send keyboard input */ bool send_keyboard_input = true; bool shownonce = false; From e711b6c44a9cc3bb5ced42dec773bc8ba1961c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 8 Apr 2022 10:20:01 +0200 Subject: [PATCH 13/78] Fix ROM location on macOS --- src/qt/qt_platform.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index af3d2b9e8..607f4fd76 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -520,11 +520,6 @@ size_t c16stombs(char dst[], const uint16_t src[], int len) #define LIB_NAME_FREETYPE "libfreetype" #define MOUSE_CAPTURE_KEYSEQ "CTRL-END" #endif -#ifdef Q_OS_MACOS -#define ROMDIR "~/Library/Application Support/net.86box.86box/roms" -#else -#define ROMDIR "roms" -#endif QMap ProgSettings::translatedstrings; @@ -602,6 +597,10 @@ plat_init_rom_paths() #endif for (auto& path : paths) { +#ifdef __APPLE__ + rom_add_path(QDir(path).filePath("net.86Box.86Box/roms").toUtf8().constData()); +#else rom_add_path(QDir(path).filePath("86Box/roms").toUtf8().constData()); +#endif } } From 3113d2555b9d3cb7344906b1cb702c5079c6a19f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 8 Apr 2022 10:23:28 +0200 Subject: [PATCH 14/78] Fix Mac bundle icon --- src/mac/CMakeLists.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mac/CMakeLists.txt b/src/mac/CMakeLists.txt index 2b71dd266..aa0fdd8b5 100644 --- a/src/mac/CMakeLists.txt +++ b/src/mac/CMakeLists.txt @@ -19,16 +19,17 @@ # Pick the bundle icon depending on the release channel if(RELEASE_BUILD) - target_sources(86Box PRIVATE icons/release/86Box.icns) + set(APP_ICON_MACOSX icons/release/86Box.icns) elseif(BETA_BUILD) - target_sources(86Box PRIVATE icons/beta/86Box.icns) + set(APP_ICON_MACOSX icons/beta/86Box.icns) elseif(ALPHA_BUILD) - target_sources(86Box PRIVATE icons/dev/86Box.icns) + set(APP_ICON_MACOSX icons/dev/86Box.icns) else() - target_sources(86Box PRIVATE icons/branch/86Box.icns) + set(APP_ICON_MACOSX icons/branch/86Box.icns) endif() target_link_libraries(86Box "-framework AppKit") +target_sources(86Box PRIVATE ${APP_ICON_MACOSX}) # Make sure the icon is copied to the bundle set_source_files_properties(${APP_ICON_MACOSX} @@ -47,7 +48,6 @@ configure_file(Info.plist.in Info.plist @ONLY) set_target_properties(86Box PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) -set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "-o linker-signed") -set(XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES") -set(XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-") -#set(XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${CMAKE_CURRENT_SOURCE_DIR}/mac/codesign/dev/app.entitlements) +#set(XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES") +#set(XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-") +#set(XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${CMAKE_CURRENT_SOURCE_DIR}/mac/codesign/dev/app.entitlements) \ No newline at end of file From 25b8f42dc66c7e9d01f8d7d88af60ae734208202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 8 Apr 2022 10:34:59 +0200 Subject: [PATCH 15/78] qt: FIx broken build due to missing define --- src/qt/qt_platform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 607f4fd76..1af65a670 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -545,7 +545,7 @@ void ProgSettings::reloadStrings() translatedstrings[IDS_2128] = QCoreApplication::translate("", "Hardware not available").toStdWString(); translatedstrings[IDS_2142] = QCoreApplication::translate("", "Monitor in sleep mode").toStdWString(); translatedstrings[IDS_2120] = QCoreApplication::translate("", "No ROMs found").toStdWString(); - translatedstrings[IDS_2056] = QCoreApplication::translate("", "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory.").replace("roms", ROMDIR).toStdWString(); + translatedstrings[IDS_2056] = QCoreApplication::translate("", "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into directory.").toStdWString(); auto flsynthstr = QCoreApplication::translate("", " is required for FluidSynth MIDI output."); if (flsynthstr.contains("libfluidsynth")) From 760d02243271bf4302379fe3e47cbd08ed0e0b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 8 Apr 2022 10:35:26 +0200 Subject: [PATCH 16/78] rom: Little fixes to get rid of warnings --- src/mem/rom.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mem/rom.c b/src/mem/rom.c index 99d6bb582..2e9697801 100644 --- a/src/mem/rom.c +++ b/src/mem/rom.c @@ -77,11 +77,11 @@ rom_add_path(const char* path) // Save the path, turning it into absolute if needed. if (!plat_path_abs((char*) path)) { - plat_getcwd(cwd, 1024); + plat_getcwd(cwd, sizeof(cwd)); plat_path_slash(cwd); - snprintf(rom_path->path, 1024, "%s%s%c", cwd, path, 0); + snprintf(rom_path->path, sizeof(rom_path->path), "%s%s", cwd, path); } else { - strncpy(rom_path->path, path, 1024); + snprintf(rom_path->path, sizeof(rom_path->path), "%s", path); } // Ensure the path ends with a separator. @@ -98,13 +98,13 @@ rom_fopen(char *fn, char *mode) if (strstr(fn, "roms/") == fn) { /* Relative path */ - do { + for(rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { plat_append_filename(temp, rom_path->path, fn + 5); - if (fp = plat_fopen(temp, mode)) { + if ((fp = plat_fopen(temp, mode)) != NULL) { return fp; } - } while(rom_path = rom_path->next); + } return fp; } else { @@ -122,14 +122,14 @@ rom_getfile(char *fn, char *s, int size) if (strstr(fn, "roms/") == fn) { /* Relative path */ - do { + for(rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { plat_append_filename(temp, rom_path->path, fn + 5); if (rom_present(temp)) { strncpy(s, temp, size); return 1; } - } while(rom_path = rom_path->next); + } return 0; } else { From 048cfbea00483df0252b6f5a4e28daed7bb516ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 8 Apr 2022 10:45:46 +0200 Subject: [PATCH 17/78] Fix accidental removal --- src/qt/qt_platform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 1af65a670..366e05970 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -545,7 +545,7 @@ void ProgSettings::reloadStrings() translatedstrings[IDS_2128] = QCoreApplication::translate("", "Hardware not available").toStdWString(); translatedstrings[IDS_2142] = QCoreApplication::translate("", "Monitor in sleep mode").toStdWString(); translatedstrings[IDS_2120] = QCoreApplication::translate("", "No ROMs found").toStdWString(); - translatedstrings[IDS_2056] = QCoreApplication::translate("", "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into directory.").toStdWString(); + translatedstrings[IDS_2056] = QCoreApplication::translate("", "86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory.").toStdWString(); auto flsynthstr = QCoreApplication::translate("", " is required for FluidSynth MIDI output."); if (flsynthstr.contains("libfluidsynth")) From ff86f97fefb8b1c88c2c3afd3de5f513218498ff Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 8 Apr 2022 15:00:35 +0600 Subject: [PATCH 18/78] unix: Fix missing include --- src/unix/unix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/unix/unix.c b/src/unix/unix.c index 36187d44a..e4be19e05 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include <86box/86box.h> From f8e53a957a71c6c8e1870eb75b725882e17233d1 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sat, 9 Apr 2022 00:12:27 +0600 Subject: [PATCH 19/78] win: Fix AppData directory creation --- src/win/win.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/win/win.c b/src/win/win.c index b655b58cf..922525cf9 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -926,11 +926,11 @@ plat_init_rom_paths() appdata_dir[len] = L'\\'; appdata_dir[len + 1] = L'\0'; } - wcscat(appdata_dir, "86box"); + wcscat(appdata_dir, L"86box"); CreateDirectoryW(appdata_dir, NULL); - wcscat(appdata_dir, "\\roms"); + wcscat(appdata_dir, L"\\roms"); CreateDirectoryW(appdata_dir, NULL); - wcscat(appdata_dir, "\\"); + wcscat(appdata_dir, L"\\"); c16stombs(appdata_dir_a, appdata_dir, 1024); rom_add_path(appdata_dir_a); } From fe94e79fa0453fbb3af9d3261ab6487ffe0e5fdf Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 11 Apr 2022 00:55:24 +0600 Subject: [PATCH 20/78] qt: Fix crashes on failed loads of media images --- src/qt/qt_mediamenu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/qt/qt_mediamenu.cpp b/src/qt/qt_mediamenu.cpp index 8ffccffdd..64f547272 100644 --- a/src/qt/qt_mediamenu.cpp +++ b/src/qt/qt_mediamenu.cpp @@ -338,6 +338,9 @@ void MediaMenu::floppyExportTo86f(int i) { void MediaMenu::floppyUpdateMenu(int i) { QString name = floppyfns[i]; + if (!floppyMenus.contains(i)) + return; + auto* menu = floppyMenus[i]; auto childs = menu->children(); @@ -412,6 +415,8 @@ void MediaMenu::cdromReload(int i) { void MediaMenu::cdromUpdateMenu(int i) { QString name = cdrom[i].image_path; + if (!cdromMenus.contains(i)) + return; auto* menu = cdromMenus[i]; auto childs = menu->children(); @@ -515,6 +520,8 @@ void MediaMenu::zipReload(int i) { void MediaMenu::zipUpdateMenu(int i) { QString name = zip_drives[i].image_path; QString prev_name = zip_drives[i].prev_image_path; + if (!zipMenus.contains(i)) + return; auto* menu = zipMenus[i]; auto childs = menu->children(); @@ -612,6 +619,8 @@ void MediaMenu::moReload(int i) { void MediaMenu::moUpdateMenu(int i) { QString name = mo_drives[i].image_path; QString prev_name = mo_drives[i].prev_image_path; + if (!moMenus.contains(i)) + return; auto* menu = moMenus[i]; auto childs = menu->children(); From 702f80e58a30fc6649b9f9d62f0bdcbe00655bce Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Fri, 25 Mar 2022 19:42:43 -0400 Subject: [PATCH 21/78] Backport several changes from M&K --- src/include/86box/device.h | 2 +- src/include/86box/machine.h | 354 +++++++++------ src/include/86box/nvr.h | 2 + src/machine/m_amstrad.c | 11 +- src/machine/m_ps2_mca.c | 2 +- src/machine/machine_table.c | 837 ++++++++++++++++++++---------------- src/nvr_at.c | 38 +- src/qt/qt_deviceconfig.cpp | 2 +- src/win/win_devconf.c | 8 +- 9 files changed, 737 insertions(+), 519 deletions(-) diff --git a/src/include/86box/device.h b/src/include/86box/device.h index 28e9485ef..8ace9bd16 100644 --- a/src/include/86box/device.h +++ b/src/include/86box/device.h @@ -90,7 +90,7 @@ typedef struct { const char *default_string; int default_int; const char *file_filter; - device_config_spinner_t spinner; + const device_config_spinner_t spinner; const device_config_selection_t selection[16]; } device_config_t; diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index e8bda30b7..45043ebc3 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -22,76 +22,122 @@ #ifndef EMU_MACHINE_H # define EMU_MACHINE_H - /* Machine feature flags. */ -// #define MACHINE_PC 0x00000000 /* PC architecture */ -/* Feature flags for features. */ -#define MACHINE_NONMI 0x00000001 /* sys does not have NMI's */ +#define MACHINE_BUS_NONE 0x00000000 /* sys has no bus */ /* Feature flags for BUS'es. */ -#define MACHINE_BUS_ISA 0x00000004 /* sys has ISA bus */ -#define MACHINE_BUS_ISA16 0x00000008 /* sys has ISA16 bus - PC/AT architecture */ -#define MACHINE_BUS_CBUS 0x00000010 /* sys has C-BUS bus */ -#define MACHINE_BUS_PS2 0x00000020 /* system has PS/2 keyboard and mouse ports */ -#define MACHINE_BUS_EISA 0x00000040 /* sys has EISA bus */ -#define MACHINE_BUS_VLB 0x00000080 /* sys has VL bus */ -#define MACHINE_BUS_MCA 0x00000100 /* sys has MCA bus */ -#define MACHINE_BUS_PCI 0x00000200 /* sys has PCI bus */ -#define MACHINE_BUS_PCMCIA 0x00000400 /* sys has PCMCIA bus */ -#define MACHINE_BUS_AGP 0x00000800 /* sys has AGP bus */ -#define MACHINE_BUS_AC97 0x00080000 /* sys has AC97 bus (ACR/AMR/CNR slot) */ +#define MACHINE_BUS_ISA 0x00000001 /* sys has ISA bus */ +#define MACHINE_BUS_CARTRIDGE 0x00000002 /* sys has two cartridge bays */ +#define MACHINE_BUS_ISA16 0x00000004 /* sys has ISA16 bus - PC/AT architecture */ +#define MACHINE_BUS_CBUS 0x00000008 /* sys has C-BUS bus */ +#define MACHINE_BUS_PS2 0x00000010 /* system has PS/2 keyboard and mouse ports */ +#define MACHINE_BUS_EISA 0x00000020 /* sys has EISA bus */ +#define MACHINE_BUS_VLB 0x00000040 /* sys has VL bus */ +#define MACHINE_BUS_MCA 0x00000080 /* sys has MCA bus */ +#define MACHINE_BUS_PCI 0x00000100 /* sys has PCI bus */ +#define MACHINE_BUS_PCMCIA 0x00000200 /* sys has PCMCIA bus */ +#define MACHINE_BUS_AGP 0x00000400 /* sys has AGP bus */ +#define MACHINE_BUS_AC97 0x00000800 /* sys has AC97 bus (ACR/AMR/CNR slot) */ +/* Aliases. */ +#define MACHINE_CARTRIDGE (MACHINE_BUS_CARTRIDGE) /* sys has two cartridge bays */ /* Combined flags. */ -#define MACHINE_PC 0x00000004 /* sys is PC/XT-compatible (ISA) */ -#define MACHINE_AT 0x0000000C /* sys is AT-compatible (ISA + ISA16) */ -#define MACHINE_PC98 0x00000010 /* sys is NEC PC-98x1 series */ -#define MACHINE_EISA 0x0000004C /* sys is AT-compatible with EISA */ -#define MACHINE_VLB 0x0000008C /* sys is AT-compatible with VLB */ -#define MACHINE_VLB98 0x00000090 /* sys is NEC PC-98x1 series with VLB (did that even exist?) */ -#define MACHINE_VLBE 0x000000CC /* sys is AT-compatible with EISA and VLB */ -#define MACHINE_MCA 0x00000100 /* sys is MCA */ -#define MACHINE_PCI 0x0000020C /* sys is AT-compatible with PCI */ -#define MACHINE_PCI98 0x00000210 /* sys is NEC PC-98x1 series with PCI */ -#define MACHINE_PCIE 0x0000024C /* sys is AT-compatible with PCI, and EISA */ -#define MACHINE_PCIV 0x0000028C /* sys is AT-compatible with PCI and VLB */ -#define MACHINE_PCIVE 0x000002CC /* sys is AT-compatible with PCI, VLB, and EISA */ -#define MACHINE_PCMCIA 0x00000400 /* sys is AT-compatible laptop with PCMCIA */ -#define MACHINE_AGP 0x00000A0C /* sys is AT-compatible with AGP */ -#define MACHINE_AGP98 0x00000A10 /* sys is NEC PC-98x1 series with AGP (did that even exist?) */ -/* Feature flags for miscellaneous internal devices. */ -#define MACHINE_VIDEO 0x00001000 /* sys has int video */ -#define MACHINE_VIDEO_ONLY 0x00002000 /* sys has fixed video */ -#define MACHINE_MOUSE 0x00004000 /* sys has int mouse */ -#define MACHINE_SOUND 0x00008000 /* sys has int sound */ -#define MACHINE_FDC 0x00010000 /* sys has int FDC */ -#define MACHINE_NIC 0x00020000 /* sys has int NIC */ -#define MACHINE_GAMEPORT 0x00040000 /* sys has int game port */ -/* Combined flags. */ -#define MACHINE_VIDEO_FIXED 0x00003000 /* sys has fixed int video */ -/* Feature flags for internal storage controllers. */ -#define MACHINE_HDC 0x07FC0000 /* sys has int HDC */ -#define MACHINE_MFM 0x00100000 /* sys has int MFM/RLL */ -#define MACHINE_XTA 0x00200000 /* sys has int XTA */ -#define MACHINE_ESDI 0x00400000 /* sys has int ESDI */ -#define MACHINE_IDE_PRI 0x00800000 /* sys has int pri IDE/ATAPI */ -#define MACHINE_IDE_SEC 0x01000000 /* sys has int sec IDE/ATAPI */ -#define MACHINE_IDE_TER 0x02000000 /* sys has int ter IDE/ATAPI */ -#define MACHINE_IDE_QUA 0x04000000 /* sys has int qua IDE/ATAPI */ -#define MACHINE_SCSI_PRI 0x08000000 /* sys has int pri SCSI */ -#define MACHINE_SCSI_SEC 0x10000000 /* sys has int sec SCSI */ -#define MACHINE_USB 0x20000000 /* sys has int USB */ -/* Combined flags. */ -#define MACHINE_IDE 0x00800000 /* sys has int single IDE/ATAPI - mark as pri IDE/ATAPI */ -#define MACHINE_IDE_DUAL 0x01800000 /* sys has int dual IDE/ATAPI - mark as both pri and sec IDE/ATAPI */ -#define MACHINE_IDE_QUAD 0x07800000 /* sys has int quad IDE/ATAPI - mark as dual + both ter and and qua IDE/ATAPI */ -#define MACHINE_SCSI 0x08000000 /* sys has int single SCSI - mark as pri SCSI */ -#define MACHINE_SCSI_DUAL 0x18000000 /* sys has int dual SCSI - mark as both pri and sec SCSI */ -#define MACHINE_CARTRIDGE 0x20000000 /* sys has two cartridge bays */ +#define MACHINE_PC (MACHINE_BUS_ISA) /* sys is PC/XT-compatible (ISA) */ +#define MACHINE_AT (MACHINE_BUS_ISA | MACHINE_BUS_ISA16) /* sys is AT-compatible (ISA + ISA16) */ +#define MACHINE_PC98 (MACHINE_BUS_CBUS) /* sys is NEC PC-98x1 series */ +#define MACHINE_EISA (MACHINE_BUS_EISA | MACHINE_AT) /* sys is AT-compatible with EISA */ +#define MACHINE_VLB (MACHINE_BUS_VLB | MACHINE_AT) /* sys is AT-compatible with VLB */ +#define MACHINE_VLB98 (MACHINE_BUS_VLB | MACHINE_PC98) /* sys is NEC PC-98x1 series with VLB (did that even exist?) */ +#define MACHINE_VLBE (MACHINE_BUS_VLB | MACHINE_EISA) /* sys is AT-compatible with EISA and VLB */ +#define MACHINE_MCA (MACHINE_BUS_MCA) /* sys is MCA */ +#define MACHINE_PCI (MACHINE_BUS_PCI | MACHINE_AT) /* sys is AT-compatible with PCI */ +#define MACHINE_PCI98 (MACHINE_BUS_PCI | MACHINE_PC98) /* sys is NEC PC-98x1 series with PCI */ +#define MACHINE_PCIE (MACHINE_BUS_PCI | MACHINE_EISA) /* sys is AT-compatible with PCI, and EISA */ +#define MACHINE_PCIV (MACHINE_BUS_PCI | MACHINE_VLB) /* sys is AT-compatible with PCI and VLB */ +#define MACHINE_PCIVE (MACHINE_BUS_PCI | MACHINE_VLBE) /* sys is AT-compatible with PCI, VLB, and EISA */ +#define MACHINE_PCMCIA (MACHINE_BUS_PCMCIA | MACHINE_AT) /* sys is AT-compatible laptop with PCMCIA */ +#define MACHINE_AGP (MACHINE_BUS_AGP | MACHINE_PCI) /* sys is AT-compatible with AGP */ +#define MACHINE_AGP98 (MACHINE_BUS_AGP | MACHINE_PCI98) /* sys is NEC PC-98x1 series with AGP (did that even exist?) */ -#define IS_ARCH(m, a) ((machines[m].flags & (a)) ? 1 : 0) -#define IS_AT(m) (((machines[m].flags & 0x00000FC8) && !(machines[m].flags & MACHINE_PC98)) ? 1 : 0) +#define MACHINE_PCJR (MACHINE_PC | MACHINE_CARTRIDGE) /* sys is PCjr */ +#define MACHINE_PS2 (MACHINE_AT | MACHINE_BUS_PS2) /* sys is PS/2 */ +#define MACHINE_PS2_MCA (MACHINE_MCA | MACHINE_BUS_PS2) /* sys is MCA PS/2 */ +#define MACHINE_PS2_VLB (MACHINE_VLB | MACHINE_BUS_PS2) /* sys is VLB PS/2 */ +#define MACHINE_PS2_PCI (MACHINE_PCI | MACHINE_BUS_PS2) /* sys is PCI PS/2 */ +#define MACHINE_PS2_PCIV (MACHINE_PCIV | MACHINE_BUS_PS2) /* sys is VLB/PCI PS/2 */ +#define MACHINE_PS2_AGP (MACHINE_AGP | MACHINE_BUS_PS2) /* sys is AGP PS/2 */ +#define MACHINE_PS2_A97 (MACHINE_PS2_AGP | MACHINE_BUS_AC97) /* sys is AGP/AC97 PS/2 */ +#define MACHINE_PS2_NOISA (MACHINE_PS2_AGP & ~MACHINE_AT) /* sys is AGP PS/2 without ISA */ +#define MACHINE_PS2_NOI97 (MACHINE_PS2_A97 & ~MACHINE_AT) /* sys is AGP/AC97 PS/2 without ISA */ +/* Feature flags for miscellaneous internal devices. */ +#define MACHINE_FLAGS_NONE 0x00000000 /* sys has no int devices */ +#define MACHINE_VIDEO 0x00000001 /* sys has int video */ +#define MACHINE_VIDEO_ONLY 0x00000002 /* sys has fixed video */ +#define MACHINE_MOUSE 0x00000004 /* sys has int mouse */ +#define MACHINE_FDC 0x00000008 /* sys has int FDC */ +#define MACHINE_LPT_PRI 0x00000010 /* sys has int pri LPT */ +#define MACHINE_LPT_SEC 0x00000020 /* sys has int sec LPT */ +#define MACHINE_UART_PRI 0x00000040 /* sys has int pri UART */ +#define MACHINE_UART_SEC 0x00000080 /* sys has int sec UART */ +#define MACHINE_UART_TER 0x00000100 /* sys has int ter UART */ +#define MACHINE_UART_QUA 0x00000200 /* sys has int qua UART */ +#define MACHINE_GAMEPORT 0x00000400 /* sys has int game port */ +#define MACHINE_SOUND 0x00000800 /* sys has int sound */ +#define MACHINE_NIC 0x00001000 /* sys has int NIC */ +#define MACHINE_MODEM 0x00002000 /* sys has int modem */ +/* Feature flags for advanced devices. */ +#define MACHINE_APM 0x00004000 /* sys has APM */ +#define MACHINE_ACPI 0x00008000 /* sys has ACPI */ +#define MACHINE_HWM 0x00010000 /* sys has hw monitor */ +/* Combined flags. */ +#define MACHINE_VIDEO_FIXED (MACHINE_VIDEO | MACHINE_VIDEO_ONLY) /* sys has fixed int video */ +#define MACHINE_SUPER_IO (MACHINE_FDC | MACHINE_LPT_PRI | MACHINE_UART_PRI | MACHINE_UART_SEC) +#define MACHINE_SUPER_IO_GAME (MACHINE_SUPER_IO | MACHINE_GAMEPORT) +#define MACHINE_SUPER_IO_DUAL (MACHINE_SUPER_IO | MACHINE_LPT_SEC | MACHINE_UART_TER | MACHINE_UART_QUA) +#define MACHINE_AV (MACHINE_VIDEO | MACHINE_SOUND) /* sys has video and sound */ +#define MACHINE_AG (MACHINE_SOUND | MACHINE_GAMEPORT) /* sys has sound and game port */ +/* Feature flags for internal storage controllers. */ +#define MACHINE_HDC 0x03FE0000 /* sys has int HDC */ +#define MACHINE_MFM 0x00020000 /* sys has int MFM/RLL */ +#define MACHINE_XTA 0x00040000 /* sys has int XTA */ +#define MACHINE_ESDI 0x00080000 /* sys has int ESDI */ +#define MACHINE_IDE_PRI 0x00100000 /* sys has int pri IDE/ATAPI */ +#define MACHINE_IDE_SEC 0x00200000 /* sys has int sec IDE/ATAPI */ +#define MACHINE_IDE_TER 0x00400000 /* sys has int ter IDE/ATAPI */ +#define MACHINE_IDE_QUA 0x00800000 /* sys has int qua IDE/ATAPI */ +#define MACHINE_SCSI_PRI 0x01000000 /* sys has int pri SCSI */ +#define MACHINE_SCSI_SEC 0x02000000 /* sys has int sec SCSI */ +#define MACHINE_USB_PRI 0x04000000 /* sys has int pri USB */ +#define MACHINE_USB_SEC 0x08000000 /* sys has int sec USB */ +/* Combined flags. */ +#define MACHINE_IDE (MACHINE_IDE_PRI) /* sys has int single IDE/ATAPI - mark as pri IDE/ATAPI */ +#define MACHINE_IDE_DUAL (MACHINE_IDE_PRI | MACHINE_IDE_SEC) /* sys has int dual IDE/ATAPI - mark as both pri and sec IDE/ATAPI */ +#define MACHINE_IDE_DUALTQ (MACHINE_IDE_TER | MACHINE_IDE_QUA) +#define MACHINE_IDE_QUAD (MACHINE_IDE_DUAL | MACHINE_IDE_DUALTQ) /* sys has int quad IDE/ATAPI - mark as dual + both ter and and qua IDE/ATAPI */ +#define MACHINE_SCSI (MACHINE_SCSI_PRI) /* sys has int single SCSI - mark as pri SCSI */ +#define MACHINE_SCSI_DUAL (MACHINE_SCSI_PRI | MACHINE_SCSI_SEC) /* sys has int dual SCSI - mark as both pri and sec SCSI */ +#define MACHINE_USB (MACHINE_USB_PRI) +#define MACHINE_USB_DUAL (MACHINE_USB_PRI | MACHINE_USB_SEC) +/* Special combined flags. */ +#define MACHINE_PIIX (MACHINE_IDE_DUAL) +#define MACHINE_PIIX3 (MACHINE_PIIX | MACHINE_USB) +/* TODO: ACPI flag. */ +#define MACHINE_PIIX4 (MACHINE_PIIX3 | MACHINE_ACPI) + +#define IS_ARCH(m, a) ((machines[m].bus_flags & (a)) ? 1 : 0) +#define IS_AT(m) (((machines[m].bus_flags & (MACHINE_BUS_ISA16 | MACHINE_BUS_EISA | MACHINE_BUS_VLB | MACHINE_BUS_MCA | MACHINE_BUS_PCI | MACHINE_BUS_PCMCIA | MACHINE_BUS_AGP | MACHINE_BUS_AC97)) && !(machines[m].bus_flags & MACHINE_PC98)) ? 1 : 0) #define CPU_BLOCK(...) (const uint8_t[]) {__VA_ARGS__, 0} #define MACHINE_MULTIPLIER_FIXED -1, -1 +#define CPU_BLOCK_NONE 0 +#define CPU_BLOCK_QDI_FMB CPU_BLOCK(CPU_WINCHIP, CPU_WINCHIP2, CPU_Cx6x86, CPU_Cx6x86L, CPU_Cx6x86MX) +#define CPU_BLOCK_SOYO_4SAW2 CPU_BLOCK(CPU_i486SX, CPU_i486DX, CPU_Am486SX, CPU_Am486DX) + +/* Make sure it's always an invalid value to avoid misdetections. */ +#if (defined __amd64__ || defined _M_X64 || defined __aarch64__ || defined _M_ARM64) +#define MACHINE_AVAILABLE 0xffffffffffffffffULL +#else +#define MACHINE_AVAILABLE 0xffffffff +#endif enum { MACHINE_TYPE_NONE = 0, @@ -121,69 +167,130 @@ enum { MACHINE_TYPE_MAX }; +enum { + MACHINE_CHIPSET_NONE = 0, + MACHINE_CHIPSET_DISCRETE, + MACHINE_CHIPSET_PROPRIETARY, + MACHINE_CHIPSET_GC100A, + MACHINE_CHIPSET_GC103, + MACHINE_CHIPSET_HT18, + MACHINE_CHIPSET_ACC_2168, + MACHINE_CHIPSET_ALI_M1217, + MACHINE_CHIPSET_ALI_M6117, + MACHINE_CHIPSET_ALI_M1409, + MACHINE_CHIPSET_ALI_M1429, + MACHINE_CHIPSET_ALI_M1429G, + MACHINE_CHIPSET_ALI_M1489, + MACHINE_CHIPSET_ALI_ALADDIN_IV_PLUS, + MACHINE_CHIPSET_ALI_ALADDIN_V, + MACHINE_CHIPSET_ALI_ALADDIN_PRO_II, + MACHINE_CHIPSET_SCAT, + MACHINE_CHIPSET_NEAT, + MACHINE_CHIPSET_CT_386, + MACHINE_CHIPSET_CT_CS4031, + MACHINE_CHIPSET_CONTAQ_82C596, + MACHINE_CHIPSET_CONTAQ_82C597, + MACHINE_CHIPSET_IMS_8848, + MACHINE_CHIPSET_INTEL_82335, + MACHINE_CHIPSET_INTEL_420TX, + MACHINE_CHIPSET_INTEL_420ZX, + MACHINE_CHIPSET_INTEL_420EX, + MACHINE_CHIPSET_INTEL_430LX, + MACHINE_CHIPSET_INTEL_430NX, + MACHINE_CHIPSET_INTEL_430FX, + MACHINE_CHIPSET_INTEL_430HX, + MACHINE_CHIPSET_INTEL_430VX, + MACHINE_CHIPSET_INTEL_430TX, + MACHINE_CHIPSET_INTEL_450KX, + MACHINE_CHIPSET_INTEL_440FX, + MACHINE_CHIPSET_INTEL_440EX, + MACHINE_CHIPSET_INTEL_440LX, + MACHINE_CHIPSET_INTEL_440BX, + MACHINE_CHIPSET_INTEL_440ZX, + MACHINE_CHIPSET_INTEL_440GX, + MACHINE_CHIPSET_OPTI_283, + MACHINE_CHIPSET_OPTI_291, + MACHINE_CHIPSET_OPTI_493, + MACHINE_CHIPSET_OPTI_495, + MACHINE_CHIPSET_OPTI_499, + MACHINE_CHIPSET_OPTI_895_802G, + MACHINE_CHIPSET_OPTI_547_597, + MACHINE_CHIPSET_SARC_RC2016A, + MACHINE_CHIPSET_SIS_310, + MACHINE_CHIPSET_SIS_401, + MACHINE_CHIPSET_SIS_460, + MACHINE_CHIPSET_SIS_461, + MACHINE_CHIPSET_SIS_471, + MACHINE_CHIPSET_SIS_496, + MACHINE_CHIPSET_SIS_501, + MACHINE_CHIPSET_SIS_5511, + MACHINE_CHIPSET_SIS_5571, + MACHINE_CHIPSET_SMSC_VICTORYBX_66, + MACHINE_CHIPSET_STPC_CLIENT, + MACHINE_CHIPSET_STPC_CONSUMER_II, + MACHINE_CHIPSET_STPC_ELITE, + MACHINE_CHIPSET_STPC_ATLAS, + MACHINE_CHIPSET_SYMPHONY_SL82C460, + MACHINE_CHIPSET_UMC_UM82C480, + MACHINE_CHIPSET_UMC_UM82C491, + MACHINE_CHIPSET_UMC_UM8881, + MACHINE_CHIPSET_UMC_UM8890BF, + MACHINE_CHIPSET_VIA_VT82C495, + MACHINE_CHIPSET_VIA_VT82C496G, + MACHINE_CHIPSET_VIA_APOLLO_VPX, + MACHINE_CHIPSET_VIA_APOLLO_VP3, + MACHINE_CHIPSET_VIA_APOLLO_MVP3, + MACHINE_CHIPSET_VIA_APOLLO_PRO, + MACHINE_CHIPSET_VIA_APOLLO_PRO_133, + MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, + MACHINE_CHIPSET_VLSI_SCAMP, + MACHINE_CHIPSET_VLSI_VL82C480, + MACHINE_CHIPSET_VLSI_VL82C481, + MACHINE_CHIPSET_VLSI_VL82C486, + MACHINE_CHIPSET_WD76C10, + MACHINE_CHIPSET_MAX +}; -typedef struct _machine_type_ { +typedef struct _machine_filter_ { const char *name; const char id; -} machine_type_t; +} machine_filter_t; - -#ifdef NEW_STRUCT typedef struct _machine_ { - const char *name; - const char *internal_name; - const char type; + const char *name; + const char *internal_name; + uint32_t type; + uint32_t chipset; + int (*init)(const struct _machine_ *); + uintptr_t pad, pad0, pad1, pad2; + uint32_t cpu_package; + const uint8_t *cpu_block; + uint32_t cpu_min_bus; + uint32_t cpu_max_bus; + uint16_t cpu_min_voltage; + uint16_t cpu_max_voltage; + float cpu_min_multi; + float cpu_max_multi; + uintptr_t bus_flags; + uintptr_t flags; + uint32_t min_ram, max_ram; + int ram_granularity; + int nvrmask; #ifdef EMU_DEVICE_H - const device_t *device; + const device_t *(*get_device)(void); + const device_t *(*get_vid_device)(void); #else - void *device; -#endif - struct { - const char *name; -#ifdef EMU_CPU_H - CPU *cpus; -#else - void *cpus; -#endif - } cpu[5]; - int flags; - uint32_t min_ram, max_ram; - int ram_granularity; - int nvrmask; -} machine_t; -#else -typedef struct _machine_ { - const char *name; - const char *internal_name; - const char type; - uint32_t cpu_package; - const uint8_t *cpu_block; - uint32_t cpu_min_bus; - uint32_t cpu_max_bus; - uint16_t cpu_min_voltage; - uint16_t cpu_max_voltage; - double cpu_min_multi; - double cpu_max_multi; - int flags; - uint32_t min_ram, max_ram; - int ram_granularity; - int nvrmask; - int (*init)(const struct _machine_ *); -#ifdef EMU_DEVICE_H - const device_t *(*get_device)(void); -#else - void *get_device; + void *get_device; + void *get_vid_device; #endif } machine_t; -#endif - /* Global variables. */ -extern const machine_type_t machine_types[]; -extern const machine_t machines[]; -extern int bios_only; -extern int machine; - +extern const machine_filter_t machine_types[], + machine_chipsets[]; +extern const machine_t machines[]; +extern int bios_only; +extern int machine; /* Core functions. */ extern int machine_count(void); @@ -197,15 +304,15 @@ extern void machine_init(void); extern const device_t *machine_getdevice(int m); #endif extern char *machine_get_internal_name_ex(int m); -extern int machine_get_nvrmask(int m); -extern int machine_has_flags(int m, int flags); -extern int machine_has_bus(int m, int bus_flags); -extern int machine_has_cartridge(int m); -extern int machine_get_min_ram(int m); -extern int machine_get_max_ram(int m); -extern int machine_get_ram_granularity(int m); -extern int machine_get_type(int m); -extern void machine_close(void); +extern int machine_get_nvrmask(int m); +extern int machine_has_flags(int m, int flags); +extern int machine_has_bus(int m, int bus_flags); +extern int machine_has_cartridge(int m); +extern int machine_get_min_ram(int m); +extern int machine_get_max_ram(int m); +extern int machine_get_ram_granularity(int m); +extern int machine_get_type(int m); +extern void machine_close(void); /* Initialization functions for boards and systems. */ @@ -749,5 +856,4 @@ extern int machine_xt_xi8088_init(const machine_t *); extern const device_t *xi8088_get_device(void); #endif - #endif /*EMU_MACHINE_H*/ diff --git a/src/include/86box/nvr.h b/src/include/86box/nvr.h index 7fc445be3..1788fc91b 100644 --- a/src/include/86box/nvr.h +++ b/src/include/86box/nvr.h @@ -93,6 +93,8 @@ extern const device_t ps_nvr_device; extern const device_t amstrad_nvr_device; extern const device_t ibmat_nvr_device; extern const device_t piix4_nvr_device; +extern const device_t ps_no_nmi_nvr_device; +extern const device_t amstrad_no_nmi_nvr_device; extern const device_t ami_1992_nvr_device; extern const device_t ami_1994_nvr_device; extern const device_t ami_1995_nvr_device; diff --git a/src/machine/m_amstrad.c b/src/machine/m_amstrad.c index 511855ce9..ba6470120 100644 --- a/src/machine/m_amstrad.c +++ b/src/machine/m_amstrad.c @@ -2348,7 +2348,16 @@ machine_amstrad_init(const machine_t *model, int type) memset(ams, 0x00, sizeof(amstrad_t)); ams->type = type; - device_add(&amstrad_nvr_device); + switch(type) { + case AMS_PC200: + case AMS_PPC512: + device_add(&amstrad_no_nmi_nvr_device); + break; + + default: + device_add(&amstrad_nvr_device); + break; + } machine_common_init(model); diff --git a/src/machine/m_ps2_mca.c b/src/machine/m_ps2_mca.c index f74f03dad..999e3bd8f 100644 --- a/src/machine/m_ps2_mca.c +++ b/src/machine/m_ps2_mca.c @@ -1348,7 +1348,7 @@ machine_ps2_common_init(const machine_t *model) dma16_init(); ps2_dma_init(); - device_add(&ps_nvr_device); + device_add(&ps_no_nmi_nvr_device); pic2_init(); pit_ps2_init(); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index feddea136..6b4bc0a75 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -1,25 +1,25 @@ /* - * 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. + * 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. + * This file is part of the 86Box distribution. * - * Handling of the emulated machines. + * Handling of the emulated machines. * - * NOTES: OpenAT wip for 286-class machine with open BIOS. - * PS2_M80-486 wip, pending receipt of TRM's for machine. + * NOTES: OpenAT wip for 286-class machine with open BIOS. + * PS2_M80-486 wip, pending receipt of TRM's for machine. * * * - * Authors: Sarah Walker, - * Miran Grca, - * Fred N. van Kempen, + * Authors: Sarah Walker, + * Miran Grca, + * Fred N. van Kempen, * - * Copyright 2008-2020 Sarah Walker. - * Copyright 2016-2020 Miran Grca. - * Copyright 2017-2020 Fred N. van Kempen. + * Copyright 2008-2020 Sarah Walker. + * Copyright 2016-2020 Miran Grca. + * Copyright 2017-2020 Fred N. van Kempen. */ #include #include @@ -32,34 +32,115 @@ #include <86box/device.h> #include <86box/machine.h> - -const machine_type_t machine_types[] = { - { "None", MACHINE_TYPE_NONE }, - { "8088", MACHINE_TYPE_8088 }, - { "8086", MACHINE_TYPE_8086 }, - { "80286", MACHINE_TYPE_286 }, - { "i386SX", MACHINE_TYPE_386SX }, - { "486SLC", MACHINE_TYPE_486SLC }, - { "i386DX", MACHINE_TYPE_386DX }, - { "i386DX/i486", MACHINE_TYPE_386DX_486 }, - { "i486 (Socket 168 and 1)", MACHINE_TYPE_486 }, - { "i486 (Socket 2)", MACHINE_TYPE_486_S2 }, - { "i486 (Socket 3)", MACHINE_TYPE_486_S3 }, - { "i486 (Miscellaneous)", MACHINE_TYPE_486_MISC }, - { "Socket 4", MACHINE_TYPE_SOCKET4 }, - { "Socket 5", MACHINE_TYPE_SOCKET5 }, - { "Socket 7 (Single Voltage)", MACHINE_TYPE_SOCKET7_3V }, - { "Socket 7 (Dual Voltage)", MACHINE_TYPE_SOCKET7 }, - { "Super Socket 7", MACHINE_TYPE_SOCKETS7 }, - { "Socket 8", MACHINE_TYPE_SOCKET8 }, - { "Slot 1", MACHINE_TYPE_SLOT1 }, - { "Slot 1/2", MACHINE_TYPE_SLOT1_2 }, - { "Slot 1/Socket 370", MACHINE_TYPE_SLOT1_370 }, - { "Slot 2", MACHINE_TYPE_SLOT2 }, - { "Socket 370", MACHINE_TYPE_SOCKET370 }, - { "Miscellaneous", MACHINE_TYPE_MISC } +const machine_filter_t machine_types[] = { + { "None", MACHINE_TYPE_NONE }, + { "8088", MACHINE_TYPE_8088 }, + { "8086", MACHINE_TYPE_8086 }, + { "80286", MACHINE_TYPE_286 }, + { "i386SX", MACHINE_TYPE_386SX }, + { "486SLC", MACHINE_TYPE_486SLC }, + { "i386DX", MACHINE_TYPE_386DX }, + { "i386DX/i486", MACHINE_TYPE_386DX_486 }, + { "i486 (Socket 168 and 1)", MACHINE_TYPE_486 }, + { "i486 (Socket 2)", MACHINE_TYPE_486_S2 }, + { "i486 (Socket 3)", MACHINE_TYPE_486_S3 }, + { "i486 (Miscellaneous)", MACHINE_TYPE_486_MISC }, + { "Socket 4", MACHINE_TYPE_SOCKET4 }, + { "Socket 5", MACHINE_TYPE_SOCKET5 }, + { "Socket 7 (Single Voltage)", MACHINE_TYPE_SOCKET7_3V }, + { "Socket 7 (Dual Voltage)", MACHINE_TYPE_SOCKET7 }, + { "Super Socket 7", MACHINE_TYPE_SOCKETS7 }, + { "Socket 8", MACHINE_TYPE_SOCKET8 }, + { "Slot 1", MACHINE_TYPE_SLOT1 }, + { "Slot 1/2", MACHINE_TYPE_SLOT1_2 }, + { "Slot 1/Socket 370", MACHINE_TYPE_SLOT1_370 }, + { "Slot 2", MACHINE_TYPE_SLOT2 }, + { "Socket 370", MACHINE_TYPE_SOCKET370 }, + { "Miscellaneous", MACHINE_TYPE_MISC } }; +const machine_filter_t machine_chipsets[] = { + { "None", MACHINE_CHIPSET_NONE }, + { "Discrete", MACHINE_CHIPSET_DISCRETE }, + { "Proprietary", MACHINE_CHIPSET_PROPRIETARY }, + { "Headland GC100A", MACHINE_CHIPSET_GC100A }, + { "Headland GC103", MACHINE_CHIPSET_GC103 }, + { "Headland HT18", MACHINE_CHIPSET_HT18 }, + { "ACC 2168", MACHINE_CHIPSET_ACC_2168 }, + { "ALi M1217", MACHINE_CHIPSET_ALI_M1217 }, + { "ALi M6117", MACHINE_CHIPSET_ALI_M6117 }, + { "ALi M1409", MACHINE_CHIPSET_ALI_M1409 }, + { "ALi M1429", MACHINE_CHIPSET_ALI_M1429 }, + { "ALi M1429G", MACHINE_CHIPSET_ALI_M1429G }, + { "ALi M1489", MACHINE_CHIPSET_ALI_M1489 }, + { "ALi ALADDiN IV+", MACHINE_CHIPSET_ALI_ALADDIN_IV_PLUS }, + { "ALi ALADDiN V", MACHINE_CHIPSET_ALI_ALADDIN_V }, + { "ALi ALADDiN-PRO II", MACHINE_CHIPSET_ALI_ALADDIN_PRO_II }, + { "C&T 82C235 SCAT", MACHINE_CHIPSET_SCAT }, + { "C&T CS8121 NEAT", MACHINE_CHIPSET_NEAT }, + { "C&T 386", MACHINE_CHIPSET_CT_386 }, + { "C&T CS4031", MACHINE_CHIPSET_CT_CS4031 }, + { "Contaq 82C596", MACHINE_CHIPSET_CONTAQ_82C596 }, + { "Contaq 82C597", MACHINE_CHIPSET_CONTAQ_82C597 }, + { "IMS 8848", MACHINE_CHIPSET_IMS_8848 }, + { "Intel 82335", MACHINE_CHIPSET_INTEL_82335 }, + { "Intel 420TX", MACHINE_CHIPSET_INTEL_420TX }, + { "Intel 420ZX", MACHINE_CHIPSET_INTEL_420ZX }, + { "Intel 420EX", MACHINE_CHIPSET_INTEL_420EX }, + { "Intel 430LX", MACHINE_CHIPSET_INTEL_430LX }, + { "Intel 430NX", MACHINE_CHIPSET_INTEL_430NX }, + { "Intel 430FX", MACHINE_CHIPSET_INTEL_430FX }, + { "Intel 430HX", MACHINE_CHIPSET_INTEL_430HX }, + { "Intel 430VX", MACHINE_CHIPSET_INTEL_430VX }, + { "Intel 430TX", MACHINE_CHIPSET_INTEL_430TX }, + { "Intel 450KX", MACHINE_CHIPSET_INTEL_450KX }, + { "Intel 440FX", MACHINE_CHIPSET_INTEL_440FX }, + { "Intel 440LX", MACHINE_CHIPSET_INTEL_440LX }, + { "Intel 440EX", MACHINE_CHIPSET_INTEL_440EX }, + { "Intel 440BX", MACHINE_CHIPSET_INTEL_440BX }, + { "Intel 440ZX", MACHINE_CHIPSET_INTEL_440ZX }, + { "Intel 440GX", MACHINE_CHIPSET_INTEL_440GX }, + { "OPTi 283", MACHINE_CHIPSET_OPTI_283 }, + { "OPTi 291", MACHINE_CHIPSET_OPTI_291 }, + { "OPTi 493", MACHINE_CHIPSET_OPTI_493 }, + { "OPTi 495", MACHINE_CHIPSET_OPTI_495 }, + { "OPTi 499", MACHINE_CHIPSET_OPTI_499 }, + { "OPTi 895/802G", MACHINE_CHIPSET_OPTI_895_802G }, + { "OPTi 547/597", MACHINE_CHIPSET_OPTI_547_597 }, + { "SARC RC2016A", MACHINE_CHIPSET_SARC_RC2016A }, + { "SiS 310", MACHINE_CHIPSET_SIS_310 }, + { "SiS 401", MACHINE_CHIPSET_SIS_401 }, + { "SiS 460", MACHINE_CHIPSET_SIS_460 }, + { "SiS 461", MACHINE_CHIPSET_SIS_461 }, + { "SiS 471", MACHINE_CHIPSET_SIS_471 }, + { "SiS 496", MACHINE_CHIPSET_SIS_496 }, + { "SiS 501", MACHINE_CHIPSET_SIS_501 }, + { "SiS 5511", MACHINE_CHIPSET_SIS_5511 }, + { "SiS 5571", MACHINE_CHIPSET_SIS_5571 }, + { "SMSC VictoryBX-66", MACHINE_CHIPSET_SMSC_VICTORYBX_66 }, + { "STPC Client", MACHINE_CHIPSET_STPC_CLIENT }, + { "STPC Consumer-II", MACHINE_CHIPSET_STPC_CONSUMER_II }, + { "STPC Elite", MACHINE_CHIPSET_STPC_ELITE }, + { "STPC Atlas", MACHINE_CHIPSET_STPC_ATLAS }, + { "Symphony SL82C460 Haydn II", MACHINE_CHIPSET_SYMPHONY_SL82C460 }, + { "UMC UM82C480", MACHINE_CHIPSET_UMC_UM82C480 }, + { "UMC UM82C491", MACHINE_CHIPSET_UMC_UM82C491 }, + { "UMC UM8881", MACHINE_CHIPSET_UMC_UM8881 }, + { "UMC UM8890BF", MACHINE_CHIPSET_UMC_UM8890BF }, + { "VIA VT82C495", MACHINE_CHIPSET_VIA_VT82C495 }, + { "VIA VT82C496G", MACHINE_CHIPSET_VIA_VT82C496G }, + { "VIA Apollo VPX", MACHINE_CHIPSET_VIA_APOLLO_VPX }, + { "VIA Apollo VP3", MACHINE_CHIPSET_VIA_APOLLO_VP3 }, + { "VIA Apollo MVP3", MACHINE_CHIPSET_VIA_APOLLO_MVP3 }, + { "VIA Apollo Pro", MACHINE_CHIPSET_VIA_APOLLO_PRO }, + { "VIA Apollo Pro 133", MACHINE_CHIPSET_VIA_APOLLO_PRO_133 }, + { "VIA Apollo Pro 133A", MACHINE_CHIPSET_VIA_APOLLO_PRO_133A }, + { "VLSI SCAMP", MACHINE_CHIPSET_VLSI_SCAMP }, + { "VLSI VL82C480", MACHINE_CHIPSET_VLSI_VL82C480 }, + { "VLSI VL82C481", MACHINE_CHIPSET_VLSI_VL82C481 }, + { "VLSI VL82C486", MACHINE_CHIPSET_VLSI_VL82C486 }, + { "WD76C10", MACHINE_CHIPSET_WD76C10 } +}; /* Machines to add before machine freeze: - PCChips M773 (440BX + SMSC with AMI BIOS); @@ -68,34 +149,34 @@ const machine_type_t machine_types[] = { - Zeos Quadtel 486. NOTE: The AMI MegaKey tests were done on a real Intel Advanced/ATX - (thanks, MrKsoft for running my AMIKEY.COM on it), but the - technical specifications of the other Intel machines confirm - that the other boards also have the MegaKey. + (thanks, MrKsoft for running my AMIKEY.COM on it), but the + technical specifications of the other Intel machines confirm + that the other boards also have the MegaKey. NOTE: The later (ie. not AMI Color) Intel AMI BIOS'es execute a - sequence of commands (B8, BA, BB) during one of the very first - phases of POST, in a way that is only valid on the AMIKey-3 - KBC firmware, that includes the Classic PCI/ED (Ninja) BIOS - which otherwise does not execute any AMI KBC commands, which - indicates that the sequence is a leftover of whatever AMI - BIOS (likely a laptop one since the AMIKey-3 is a laptop KBC - firmware!) Intel forked. + sequence of commands (B8, BA, BB) during one of the very first + phases of POST, in a way that is only valid on the AMIKey-3 + KBC firmware, that includes the Classic PCI/ED (Ninja) BIOS + which otherwise does not execute any AMI KBC commands, which + indicates that the sequence is a leftover of whatever AMI + BIOS (likely a laptop one since the AMIKey-3 is a laptop KBC + firmware!) Intel forked. NOTE: The VIA VT82C42N returns 0x46 ('F') in command 0xA1 (so it - emulates the AMI KF/AMIKey KBC firmware), and 0x42 ('B') in - command 0xAF. - The version on the VIA VT82C686B southbridge also returns - 'F' in command 0xA1, but 0x45 ('E') in command 0xAF. - The version on the VIA VT82C586B southbridge also returns - 'F' in command 0xA1, but 0x44 ('D') in command 0xAF. - The version on the VIA VT82C586A southbridge also returns - 'F' in command 0xA1, but 0x43 ('C') in command 0xAF. + emulates the AMI KF/AMIKey KBC firmware), and 0x42 ('B') in + command 0xAF. + The version on the VIA VT82C686B southbridge also returns + 'F' in command 0xA1, but 0x45 ('E') in command 0xAF. + The version on the VIA VT82C586B southbridge also returns + 'F' in command 0xA1, but 0x44 ('D') in command 0xAF. + The version on the VIA VT82C586A southbridge also returns + 'F' in command 0xA1, but 0x43 ('C') in command 0xAF. NOTE: The AMI MegaKey commands blanked in the technical reference - are CC and and C4, which are Set P14 High and Set P14 Low, - respectively. Also, AMI KBC command C1, mysteriously missing - from the technical references of AMI MegaKey and earlier, is - Write Input Port, same as on AMIKey-3. + are CC and and C4, which are Set P14 High and Set P14 Low, + respectively. Also, AMI KBC command C1, mysteriously missing + from the technical references of AMI MegaKey and earlier, is + Write Input Port, same as on AMIKey-3. Machines to remove: - Hedaka HED-919. @@ -104,228 +185,228 @@ const machine_type_t machine_types[] = { const machine_t machines[] = { /* 8088 Machines */ - { "[8088] IBM PC (1981)", "ibmpc", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 16, 64, 16, 0, machine_pc_init, NULL }, - { "[8088] IBM PC (1982)", "ibmpc82", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 256, 64, 0, machine_pc82_init, NULL }, - { "[8088] IBM PCjr", "ibmpcjr", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 4772728, 4772728, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED | MACHINE_CARTRIDGE, 128, 640, 128, 0, machine_pcjr_init, pcjr_get_device }, - { "[8088] IBM XT (1982)", "ibmxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 256, 64, 0, machine_xt_init, NULL }, - { "[8088] IBM XT (1986)", "ibmxt86", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 256, 640, 64, 0, machine_xt86_init, NULL }, - { "[8088] American XT Computer", "americxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_americxt_init, NULL }, - { "[8088] AMI XT clone", "amixt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_amixt_init, NULL }, - { "[8088] Columbia Data Products MPC-1600", "mpc1600", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 512, 64, 0, machine_xt_mpc1600_init, NULL }, - { "[8088] Compaq Portable", "portable", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_compaq_portable_init, NULL }, - { "[8088] DTK PIM-TB10-Z", "dtk", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_dtk_init, NULL }, - { "[8088] Eagle PC Spirit", "pcspirit", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 64, 0, machine_xt_pcspirit_init, NULL }, - { "[8088] Generic XT clone", "genxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_genxt_init, NULL }, - { "[8088] Juko ST", "jukopc", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_jukopc_init, NULL }, - { "[8088] Multitech PC-500", "pc500", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 64, 0, machine_xt_pc500_init, NULL }, - { "[8088] Multitech PC-700", "pc700", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 64, 0, machine_xt_pc700_init, NULL }, - { "[8088] NCR PC4i", "pc4i", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 256, 640, 256, 0, machine_xt_pc4i_init, NULL }, - { "[8088] Olivetti M19", "m19", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 4772728, 7159092, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 256, 640, 256, 0, machine_xt_m19_init, m19_get_device }, - { "[8088] OpenXT", "openxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_openxt_init, NULL }, - { "[8088] Philips P3105/NMS9100", "p3105", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_XTA, 256, 768, 256, 0, machine_xt_p3105_init, NULL }, - { "[8088] Phoenix XT clone", "pxxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_pxxt_init, NULL }, - { "[8088] Schneider EuroPC", "europc", MACHINE_TYPE_8088, CPU_PKG_8088_EUROPC, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_XTA | MACHINE_MOUSE, 512, 640, 128, 15, machine_europc_init, NULL }, - { "[8088] Super PC/Turbo XT", "pcxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_pcxt_init, NULL }, - { "[8088] Tandy 1000", "tandy", MACHINE_TYPE_8088, CPU_PKG_8088_EUROPC, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 128, 640, 128, 0, machine_tandy_init, tandy1k_get_device }, - { "[8088] Tandy 1000 HX", "tandy1000hx", MACHINE_TYPE_8088, CPU_PKG_8088_EUROPC, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 256, 640, 128, 0, machine_tandy1000hx_init, tandy1k_hx_get_device }, - { "[8088] Toshiba T1000", "t1000", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO, 512, 1280, 768, 63, machine_xt_t1000_init, t1000_get_device }, - { "[8088] Vendex HeadStart Turbo 888-XT","vendex", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 256, 768, 256, 0, machine_xt_vendex_init, NULL }, + { "[8088] IBM PC (1981)", "ibmpc", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_pc_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 16, 64, 16, 0, NULL, NULL }, + { "[8088] IBM PC (1982)", "ibmpc82", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_pc82_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 64, 256, 64, 0, NULL, NULL }, + { "[8088] IBM PCjr", "ibmpcjr", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_pcjr_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 4772728, 4772728, 0, 0, 0, 0, MACHINE_PCJR, MACHINE_VIDEO_FIXED, 128, 640, 128, 0, pcjr_get_device, NULL }, + { "[8088] IBM XT (1982)", "ibmxt", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 64, 256, 64, 0, NULL, NULL }, + { "[8088] IBM XT (1986)", "ibmxt86", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt86_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 256, 640, 64, 0, NULL, NULL }, + { "[8088] American XT Computer", "americxt", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_americxt_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 64, 640, 64, 0, NULL, NULL }, + { "[8088] AMI XT clone", "amixt", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_amixt_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 64, 640, 64, 0, NULL, NULL }, + { "[8088] Columbia Data Products MPC-1600", "mpc1600", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_mpc1600_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 512, 64, 0, NULL, NULL }, + { "[8088] Compaq Portable", "portable", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_compaq_portable_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 128, 0, NULL, NULL }, + { "[8088] DTK PIM-TB10-Z", "dtk", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_dtk_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 64, 640, 64, 0, NULL, NULL }, + { "[8088] Eagle PC Spirit", "pcspirit", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_pcspirit_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 64, 0, NULL, NULL }, + { "[8088] Generic XT clone", "genxt", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_genxt_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 64, 640, 64, 0, NULL, NULL }, + { "[8088] Juko ST", "jukopc", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_jukopc_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 64, 640, 64, 0, NULL, NULL }, + { "[8088] Multitech PC-500", "pc500", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_pc500_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 64, 0, NULL, NULL }, + { "[8088] Multitech PC-700", "pc700", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_pc700_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 64, 0, NULL, NULL }, + { "[8088] NCR PC4i", "pc4i", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_pc4i_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 256, 640, 256, 0, NULL, NULL }, + { "[8088] Olivetti M19", "m19", MACHINE_TYPE_8088, MACHINE_CHIPSET_PROPRIETARY, machine_xt_m19_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 4772728, 7159092, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED, 256, 640, 256, 0, m19_get_device, NULL }, + { "[8088] OpenXT", "openxt", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_openxt_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 64, 640, 64, 0, NULL, NULL }, + { "[8088] Philips P3105/NMS9100", "p3105", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_p3105_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_XTA, 256, 768, 256, 0, NULL, NULL }, + { "[8088] Phoenix XT clone", "pxxt", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_pxxt_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 64, 640, 64, 0, NULL, NULL }, + { "[8088] Schneider EuroPC", "europc", MACHINE_TYPE_8088, MACHINE_CHIPSET_PROPRIETARY, machine_europc_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088_EUROPC, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_XTA | MACHINE_MOUSE, 512, 640, 128, 15, NULL, NULL }, + { "[8088] Super PC/Turbo XT", "pcxt", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_pcxt_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 64, 640, 64, 0, NULL, NULL }, + { "[8088] Tandy 1000", "tandy", MACHINE_TYPE_8088, MACHINE_CHIPSET_PROPRIETARY, machine_tandy_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088_EUROPC, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED, 128, 640, 128, 0, tandy1k_get_device, NULL }, + { "[8088] Tandy 1000 HX", "tandy1000hx", MACHINE_TYPE_8088, MACHINE_CHIPSET_PROPRIETARY, machine_tandy1000hx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088_EUROPC, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED, 256, 640, 128, 0, tandy1k_hx_get_device, NULL }, + { "[8088] Toshiba T1000", "t1000", MACHINE_TYPE_8088, MACHINE_CHIPSET_PROPRIETARY, machine_xt_t1000_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO, 512, 1280, 768, 63, t1000_get_device, NULL }, + { "[8088] Vendex HeadStart Turbo 888-XT", "vendex", MACHINE_TYPE_8088, MACHINE_CHIPSET_PROPRIETARY, machine_xt_vendex_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 256, 768, 256, 0, NULL, NULL }, #if defined(DEV_BRANCH) && defined(USE_LASERXT) - { "[8088] VTech Laser Turbo XT", "ltxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 256, 640, 256, 0, machine_xt_laserxt_init, NULL }, + { "[8088] VTech Laser Turbo XT", "ltxt", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_laserxt_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 256, 640, 256, 0,NULL, NULL }, #endif /* Has a standard PS/2 KBC (so, use IBM PS/2 Type 1). */ - { "[8088] Xi8088", "xi8088", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2, 64, 1024, 128, 127, machine_xt_xi8088_init, xi8088_get_device }, - { "[8088] Z-NIX PC-1600", "znic", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_znic_init, NULL }, - { "[8088] Zenith Data Systems Z-151/152/161","zdsz151", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 64, 0, machine_xt_z151_init, NULL }, - { "[8088] Zenith Data Systems Z-159", "zdsz159", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 64, 0, machine_xt_z159_init, NULL }, - { "[8088] Zenith Data Systems SupersPort (Z-184)","zdsupers", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 128, 640, 128, 0, machine_xt_z184_init, z184_get_device }, - { "[GC100A] Philips P3120", "p3120", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_XTA, 256, 768, 256, 0, machine_xt_p3120_init, NULL }, + { "[8088] Xi8088", "xi8088", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_xi8088_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_FLAGS_NONE, 64, 1024, 128, 127, xi8088_get_device}, + { "[8088] Z-NIX PC-1600", "znic", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_znic_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 64, 640, 64, 0, NULL, NULL }, + { "[8088] Zenith Data Systems Z-151/152/161", "zdsz151", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_z151_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 64, 0, NULL, NULL }, + { "[8088] Zenith Data Systems Z-159", "zdsz159", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_z159_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 64, 0, NULL, NULL }, + { "[8088] Zenith Data Systems SupersPort (Z-184)", "zdsupers", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_z184_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED, 128, 640, 128, 0, z184_get_device}, + { "[GC100A] Philips P3120", "p3120", MACHINE_TYPE_8088, MACHINE_CHIPSET_GC100A, machine_xt_p3120_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_XTA, 256, 768, 256, 0, NULL, NULL }, /* 8086 Machines */ - { "[8086] Amstrad PC1512", "pc1512", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 8000000, 8000000, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 512, 640, 128, 63, machine_pc1512_init, pc1512_get_device }, - { "[8086] Amstrad PC1640", "pc1640", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE, 640, 640, 640, 63, machine_pc1640_init, pc1640_get_device }, - { "[8086] Amstrad PC2086", "pc2086", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 640, 640, 640, 63, machine_pc2086_init, pc2086_get_device }, - { "[8086] Amstrad PC3086", "pc3086", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 640, 640, 640, 63, machine_pc3086_init, pc3086_get_device }, - { "[8086] Amstrad PC20(0)", "pc200", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE | MACHINE_NONMI, 512, 640, 128, 63, machine_pc200_init, pc200_get_device }, - { "[8086] Amstrad PPC512/640", "ppc512", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE | MACHINE_NONMI, 512, 640, 128, 63, machine_ppc512_init, ppc512_get_device }, - { "[8086] Compaq Deskpro", "deskpro", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_compaq_deskpro_init, NULL }, - { "[8086] Olivetti M21/24/24SP", "m24", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE, 128, 640, 128, 0, machine_xt_m24_init, m24_get_device }, + { "[8086] Amstrad PC1512", "pc1512", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc1512_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 8000000, 8000000, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 512, 640, 128, 63, pc1512_get_device}, + { "[8086] Amstrad PC1640", "pc1640", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc1640_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO | MACHINE_MOUSE, 640, 640, 640, 63, pc1640_get_device}, + { "[8086] Amstrad PC2086", "pc2086", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc2086_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 640, 640, 640, 63, pc2086_get_device}, + { "[8086] Amstrad PC3086", "pc3086", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc3086_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 640, 640, 640, 63, pc3086_get_device}, + { "[8086] Amstrad PC20(0)", "pc200", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc200_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 63, pc200_get_device}, + { "[8086] Amstrad PPC512/640", "ppc512", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_ppc512_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 63, ppc512_get_device}, + { "[8086] Compaq Deskpro", "deskpro", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_xt_compaq_deskpro_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 128, 0, NULL, NULL }, + { "[8086] Olivetti M21/24/24SP", "m24", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_xt_m24_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO | MACHINE_MOUSE, 128, 640, 128, 0, m24_get_device}, /* Has Olivetti KBC firmware. */ - { "[8086] Olivetti M240", "m240", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_m240_init, NULL }, - { "[8086] Schetmash Iskra-3104", "iskra3104", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_iskra3104_init, NULL }, - { "[8086] Tandy 1000 SL/2", "tandy1000sl2", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 512, 768, 128, 0, machine_tandy1000sl2_init, tandy1k_sl_get_device }, - { "[8086] Victor V86P", "v86p", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO, 512, 1024, 128, 127, machine_v86p_init, NULL }, - { "[8086] Toshiba T1200", "t1200", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO, 1024, 2048,1024, 63, machine_xt_t1200_init, t1200_get_device }, + { "[8086] Olivetti M240", "m240", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_xt_m240_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 128, 0, NULL, NULL }, + { "[8086] Schetmash Iskra-3104", "iskra3104", MACHINE_TYPE_8086, MACHINE_CHIPSET_DISCRETE, machine_xt_iskra3104_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 128, 0, NULL, NULL }, + { "[8086] Tandy 1000 SL/2", "tandy1000sl2", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_tandy1000sl2_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED, 512, 768, 128, 0, tandy1k_sl_get_device}, + { "[8086] Victor V86P", "v86p", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_v86p_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO, 512, 1024, 128, 127, NULL, NULL }, + { "[8086] Toshiba T1200", "t1200", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_xt_t1200_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO, 1024, 2048,1024, 63, t1200_get_device}, #if defined(DEV_BRANCH) && defined(USE_LASERXT) - { "[8086] VTech Laser XT3", "lxt3", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 256, 640, 256, 0, machine_xt_lxt3_init, NULL }, + { "[8086] VTech Laser XT3", "lxt3", MACHINE_TYPE_8086, MACHINE_CHIPSET_DISCRETE, machine_xt_lxt3_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 256, 640, 256, 0, NULL, NULL }, #endif /* 286 AT machines */ /* Has IBM AT KBC firmware. */ - { "[ISA] IBM AT", "ibmat", MACHINE_TYPE_286, CPU_PKG_286, 0, 6000000, 8000000, 0, 0, 0, 0, MACHINE_AT, 256, 15872, 128, 63, machine_at_ibm_init, NULL }, + { "[ISA] IBM AT", "ibmat", MACHINE_TYPE_286, MACHINE_CHIPSET_DISCRETE, machine_at_ibm_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 6000000, 8000000, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 256, 15872, 128, 63, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[ISA] IBM PS/1 model 2011", "ibmps1es", MACHINE_TYPE_286, CPU_PKG_286, 0, 10000000, 10000000, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_XTA | MACHINE_VIDEO_FIXED, 512, 16384, 512, 63, machine_ps1_m2011_init, NULL }, + { "[ISA] IBM PS/1 model 2011", "ibmps1es", MACHINE_TYPE_286, MACHINE_CHIPSET_PROPRIETARY, machine_ps1_m2011_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 10000000, 10000000, 0, 0, 0, 0, MACHINE_PS2, MACHINE_XTA | MACHINE_VIDEO_FIXED, 512, 16384, 512, 63, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[ISA] IBM PS/2 model 30-286", "ibmps2_m30_286", MACHINE_TYPE_286, CPU_PKG_286 | CPU_PKG_486SLC_IBM, 0, 10000000, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_XTA | MACHINE_VIDEO_FIXED, 1024, 16384,1024, 127, machine_ps2_m30_286_init, NULL }, + { "[ISA] IBM PS/2 model 30-286", "ibmps2_m30_286", MACHINE_TYPE_286, MACHINE_CHIPSET_PROPRIETARY, machine_ps2_m30_286_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286 | CPU_PKG_486SLC_IBM, CPU_BLOCK_NONE, 10000000, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_XTA | MACHINE_VIDEO_FIXED, 1024, 16384,1024, 127, NULL, NULL }, /* Has IBM AT KBC firmware. */ - { "[ISA] IBM XT Model 286", "ibmxt286", MACHINE_TYPE_286, CPU_PKG_286, 0, 6000000, 6000000, 0, 0, 0, 0, MACHINE_AT, 256, 15872, 128, 127, machine_at_ibmxt286_init, NULL }, + { "[ISA] IBM XT Model 286", "ibmxt286", MACHINE_TYPE_286, MACHINE_CHIPSET_DISCRETE, machine_at_ibmxt286_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 6000000, 6000000, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 256, 15872, 128, 127, NULL, NULL }, /* AMI BIOS for a chipset-less machine, most likely has AMI 'F' KBC firmware. */ - { "[ISA] AMI IBM AT", "ibmatami", MACHINE_TYPE_286, CPU_PKG_286, 0, 6000000, 8000000, 0, 0, 0, 0, MACHINE_AT, 256, 15872, 128, 63, machine_at_ibmatami_init, NULL }, + { "[ISA] AMI IBM AT", "ibmatami", MACHINE_TYPE_286, MACHINE_CHIPSET_DISCRETE, machine_at_ibmatami_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 6000000, 8000000, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 256, 15872, 128, 63, NULL, NULL }, /* Uses Commodore (CBM) KBC firmware, to be implemented as identical to the IBM AT KBC firmware unless evidence emerges of any proprietary commands. */ - { "[ISA] Commodore PC 30 III", "cmdpc30", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 640, 16384, 128, 127, machine_at_cmdpc_init, NULL }, + { "[ISA] Commodore PC 30 III", "cmdpc30", MACHINE_TYPE_286, MACHINE_CHIPSET_PROPRIETARY, machine_at_cmdpc_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 640, 16384, 128, 127, NULL, NULL }, /* Uses Compaq KBC firmware. */ - { "[ISA] Compaq Portable II", "portableii", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 640, 16384, 128, 127, machine_at_portableii_init, NULL }, + { "[ISA] Compaq Portable II", "portableii", MACHINE_TYPE_286, MACHINE_CHIPSET_PROPRIETARY, machine_at_portableii_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 640, 16384, 128, 127, NULL, NULL }, /* Uses Compaq KBC firmware. */ - { "[ISA] Compaq Portable III", "portableiii", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_VIDEO, 640, 16384, 128, 127, machine_at_portableiii_init, at_cpqiii_get_device }, + { "[ISA] Compaq Portable III", "portableiii", MACHINE_TYPE_286, MACHINE_CHIPSET_PROPRIETARY, machine_at_portableiii_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_VIDEO, 640, 16384, 128, 127, at_cpqiii_get_device }, /* Has IBM AT KBC firmware. */ - { "[ISA] MR BIOS 286 clone", "mr286", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE, 512, 16384, 128, 127, machine_at_mr286_init, NULL }, + { "[ISA] MR BIOS 286 clone", "mr286", MACHINE_TYPE_286, MACHINE_CHIPSET_DISCRETE, machine_at_mr286_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE, 512, 16384, 128, 127, NULL, NULL }, /* Has IBM AT KBC firmware. */ - { "[ISA] NCR PC8/810/710/3390/3392", "pc8", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 128, 127, machine_at_pc8_init, NULL }, + { "[ISA] NCR PC8/810/710/3390/3392", "pc8", MACHINE_TYPE_286, MACHINE_CHIPSET_DISCRETE, machine_at_pc8_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 16384, 128, 127, NULL, NULL }, #if defined(DEV_BRANCH) && defined(USE_OLIVETTI) /* Has Olivetti KBC firmware. */ - { "[ISA] Olivetti M290", "m290", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 640, 16384, 128, 127, machine_at_m290_init, NULL }, + { "[ISA] Olivetti M290", "m290", MACHINE_TYPE_286, MACHINE_CHIPSET_PROPRIETARY, machine_at_m290_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 640, 16384, 128, 127, NULL, NULL }, #endif #if defined(DEV_BRANCH) && defined(USE_OPEN_AT) /* Has IBM AT KBC firmware. */ - { "[ISA] OpenAT", "openat", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 256, 15872, 128, 63, machine_at_openat_init, NULL }, + { "[ISA] OpenAT", "openat", MACHINE_TYPE_286, MACHINE_CHIPSET_DISCRETE, machine_at_openat_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 256, 15872, 128, 63, NULL, NULL }, #endif /* Has IBM AT KBC firmware. */ - { "[ISA] Phoenix IBM AT", "ibmatpx", MACHINE_TYPE_286, CPU_PKG_286, 0, 6000000, 8000000, 0, 0, 0, 0, MACHINE_AT, 256, 15872, 128, 63, machine_at_ibmatpx_init, NULL }, + { "[ISA] Phoenix IBM AT", "ibmatpx", MACHINE_TYPE_286, MACHINE_CHIPSET_DISCRETE, machine_at_ibmatpx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 6000000, 8000000, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 256, 15872, 128, 63, NULL, NULL }, /* Has Quadtel KBC firmware. */ - { "[ISA] Quadtel IBM AT", "ibmatquadtel", MACHINE_TYPE_286, CPU_PKG_286, 0, 6000000, 8000000, 0, 0, 0, 0, MACHINE_AT, 256, 15872, 128, 63, machine_at_ibmatquadtel_init, NULL }, + { "[ISA] Quadtel IBM AT", "ibmatquadtel", MACHINE_TYPE_286, MACHINE_CHIPSET_DISCRETE, machine_at_ibmatquadtel_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 6000000, 8000000, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 256, 15872, 128, 63, NULL, NULL }, /* This has a Siemens proprietary KBC which is completely undocumented. */ - { "[ISA] Siemens PCD-2L", "siemens", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 256, 15872, 128, 63, machine_at_siemens_init, NULL }, + { "[ISA] Siemens PCD-2L", "siemens", MACHINE_TYPE_286, MACHINE_CHIPSET_DISCRETE, machine_at_siemens_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 256, 15872, 128, 63, NULL, NULL }, /* This has Toshiba's proprietary KBC, which is already implemented. */ - { "[ISA] Toshiba T3100e", "t3100e", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE | MACHINE_VIDEO_FIXED, 1024, 5120, 256, 63, machine_at_t3100e_init, NULL }, + { "[ISA] Toshiba T3100e", "t3100e", MACHINE_TYPE_286, MACHINE_CHIPSET_PROPRIETARY, machine_at_t3100e_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE | MACHINE_VIDEO_FIXED, 1024, 5120, 256, 63, NULL, NULL }, /* Has Quadtel KBC firmware. */ - { "[GC103] Quadtel 286 clone", "quadt286", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 128, 127, machine_at_quadt286_init, NULL }, + { "[GC103] Quadtel 286 clone", "quadt286", MACHINE_TYPE_286, MACHINE_CHIPSET_GC103, machine_at_quadt286_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 16384, 128, 127, NULL, NULL }, /* Most likely has AMI 'F' KBC firmware. */ - { "[GC103] TriGem 286M", "tg286m", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE, 512, 8192, 128, 127, machine_at_tg286m_init, NULL }, + { "[GC103] TriGem 286M", "tg286m", MACHINE_TYPE_286, MACHINE_CHIPSET_GC103, machine_at_tg286m_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE, 512, 8192, 128, 127, NULL, NULL }, /* This has "AMI KEYBOARD BIOS", most likely 'F'. */ - { "[NEAT] DataExpert 286", "ami286", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 8192, 128, 127, machine_at_neat_ami_init, NULL }, + { "[NEAT] DataExpert 286", "ami286", MACHINE_TYPE_286, MACHINE_CHIPSET_NEAT, machine_at_neat_ami_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 8192, 128, 127, NULL, NULL }, /* Has IBM AT KBC firmware. */ - { "[NEAT] NCR 3302", "3302", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_VIDEO, 512, 16384, 128, 127, machine_at_3302_init, NULL }, + { "[NEAT] NCR 3302", "3302", MACHINE_TYPE_286, MACHINE_CHIPSET_NEAT, machine_at_3302_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_VIDEO, 512, 16384, 128, 127, NULL, NULL }, /* Has IBM AT KBC firmware. */ - { "[NEAT] Phoenix 286 clone", "px286", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 128, 127, machine_at_px286_init, NULL }, + { "[NEAT] Phoenix 286 clone", "px286", MACHINE_TYPE_286, MACHINE_CHIPSET_NEAT, machine_at_px286_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 16384, 128, 127, NULL, NULL }, /* Has Chips & Technologies KBC firmware. */ - { "[SCAT] GW-286CT GEAR", "gw286ct", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE, 512, 16384, 128, 127, machine_at_gw286ct_init, NULL }, + { "[SCAT] GW-286CT GEAR", "gw286ct", MACHINE_TYPE_286, MACHINE_CHIPSET_SCAT, machine_at_gw286ct_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE, 512, 16384, 128, 127, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[SCAT] Goldstar GDC-212M", "gdc212m", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE | MACHINE_BUS_PS2, 512, 4096, 512, 127, machine_at_gdc212m_init, NULL }, + { "[SCAT] Goldstar GDC-212M", "gdc212m", MACHINE_TYPE_286, MACHINE_CHIPSET_SCAT, machine_at_gdc212m_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE, 512, 4096, 512, 127, NULL, NULL }, /* Has a VIA VT82C42N KBC. */ - { "[SCAT] Hyundai Solomon 286KP", "award286", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 128, 127, machine_at_award286_init, NULL }, + { "[SCAT] Hyundai Solomon 286KP", "award286", MACHINE_TYPE_286, MACHINE_CHIPSET_SCAT, machine_at_award286_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 16384, 128, 127, NULL, NULL }, /* Has a VIA VT82C42N KBC. */ - { "[SCAT] Hyundai Super-286TR", "super286tr", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 128, 127, machine_at_super286tr_init, NULL }, + { "[SCAT] Hyundai Super-286TR", "super286tr", MACHINE_TYPE_286, MACHINE_CHIPSET_SCAT, machine_at_super286tr_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 16384, 128, 127, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[SCAT] Samsung SPC-4200P", "spc4200p", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2, 512, 2048, 128, 127, machine_at_spc4200p_init, NULL }, + { "[SCAT] Samsung SPC-4200P", "spc4200p", MACHINE_TYPE_286, MACHINE_CHIPSET_SCAT, machine_at_spc4200p_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_FLAGS_NONE, 512, 2048, 128, 127, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[SCAT] Samsung SPC-4216P", "spc4216p", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2, 1024, 5120,1024, 127, machine_at_spc4216p_init, NULL }, + { "[SCAT] Samsung SPC-4216P", "spc4216p", MACHINE_TYPE_286, MACHINE_CHIPSET_SCAT, machine_at_spc4216p_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_FLAGS_NONE, 1024, 5120,1024, 127, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[SCAT] Samsung SPC-4620P", "spc4620p", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_VIDEO, 1024, 5120,1024, 127, machine_at_spc4620p_init, NULL }, + { "[SCAT] Samsung SPC-4620P", "spc4620p", MACHINE_TYPE_286, MACHINE_CHIPSET_SCAT, machine_at_spc4620p_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_VIDEO, 1024, 5120,1024, 127, NULL, NULL }, /* Has IBM AT KBC firmware. */ - { "[SCAT] Samsung Deskmaster 286", "deskmaster286", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 128, 127, machine_at_deskmaster286_init, NULL }, + { "[SCAT] Samsung Deskmaster 286", "deskmaster286", MACHINE_TYPE_286, MACHINE_CHIPSET_SCAT, machine_at_deskmaster286_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 16384, 128, 127, NULL, NULL }, /* 286 machines that utilize the MCA bus */ /* Has IBM PS/2 Type 2 KBC firmware. */ - { "[MCA] IBM PS/2 model 50", "ibmps2_m50", MACHINE_TYPE_286, CPU_PKG_286 | CPU_PKG_486SLC_IBM, 0, 10000000, 0, 0, 0, 0, 0, MACHINE_MCA | MACHINE_BUS_PS2 | MACHINE_VIDEO, 1024, 10240,1024, 63, machine_ps2_model_50_init, NULL }, + { "[MCA] IBM PS/2 model 50", "ibmps2_m50", MACHINE_TYPE_286, MACHINE_CHIPSET_PROPRIETARY, machine_ps2_model_50_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286 | CPU_PKG_486SLC_IBM, CPU_BLOCK_NONE, 10000000, 0, 0, 0, 0, 0, MACHINE_PS2_MCA, MACHINE_VIDEO, 1024, 10240, 1024, 63, NULL, NULL }, /* 386SX machines */ /* ISA slots available because an official IBM expansion for that existed. */ /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[ISA] IBM PS/1 model 2121", "ibmps1_2121", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 6144,1024, 63, machine_ps1_m2121_init, NULL }, + { "[ISA] IBM PS/1 model 2121", "ibmps1_2121", MACHINE_TYPE_386SX, MACHINE_CHIPSET_PROPRIETARY, machine_ps1_m2121_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 2048, 6144,1024, 63, NULL, NULL }, /* Has IBM AT KBC firmware. */ - { "[ISA] NCR PC916SX", "pc916sx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 16384, 128, 127, machine_at_pc916sx_init, NULL }, + { "[ISA] NCR PC916SX", "pc916sx", MACHINE_TYPE_386SX, MACHINE_CHIPSET_DISCRETE, machine_at_pc916sx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 1024, 16384, 128, 127, NULL, NULL }, /* Has Quadtel KBC firmware. */ - { "[ISA] QTC-SXM KT X20T02/HI", "quadt386sx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 16384, 128, 127, machine_at_quadt386sx_init, NULL }, + { "[ISA] QTC-SXM KT X20T02/HI", "quadt386sx", MACHINE_TYPE_386SX, MACHINE_CHIPSET_DISCRETE, machine_at_quadt386sx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 1024, 16384, 128, 127, NULL, NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[ALi M1217] Acrosser AR-B1374", "arb1374", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE, 1024, 32768,1024, 127, machine_at_arb1374_init, NULL }, + { "[ALi M1217] Acrosser AR-B1374", "arb1374", MACHINE_TYPE_386SX, MACHINE_CHIPSET_ALI_M1217, machine_at_arb1374_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE, 1024, 32768,1024, 127, NULL, NULL }, /* Has the AMIKey KBC firmware, which is an updated 'F' type. */ - { "[ALi M1217] AAEON SBC-350A", "sbc350a", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE, 1024, 16384, 1024, 127, machine_at_sbc350a_init, NULL }, + { "[ALi M1217] AAEON SBC-350A", "sbc350a", MACHINE_TYPE_386SX, MACHINE_CHIPSET_ALI_M1217, machine_at_sbc350a_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE, 1024, 16384, 1024, 127, NULL, NULL }, /* Has an AMI KBC firmware, the only photo of this is too low resolution for me to read what's on the KBC chip, so I'm going to assume AMI 'F' based on the other known HT18 AMI BIOS strings. */ - { "[ALi M1217] Flytech 386", "flytech386", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 1024, 16384, 1024, 127, machine_at_flytech386_init, at_flytech386_get_device }, + { "[ALi M1217] Flytech 386", "flytech386", MACHINE_TYPE_386SX, MACHINE_CHIPSET_ALI_M1217, machine_at_flytech386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 1024, 16384, 1024, 127, at_flytech386_get_device }, /* I'm going to assume this has a standard/generic IBM-compatible AT KBC firmware until the board is identified. */ - { "[ALi M1217] MR BIOS 386SX clone", "mr1217", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 1024, 16384, 1024, 127, machine_at_mr1217_init, NULL }, + { "[ALi M1217] MR BIOS 386SX clone", "mr1217", MACHINE_TYPE_386SX, MACHINE_CHIPSET_ALI_M1217, machine_at_mr1217_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 1024, 16384, 1024, 127, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[ALi M6117] Acrosser PJ-A511M", "pja511m", MACHINE_TYPE_386SX, CPU_PKG_M6117, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE, 1024, 32768, 1024, 127, machine_at_pja511m_init, NULL }, + { "[ALi M6117] Acrosser PJ-A511M", "pja511m", MACHINE_TYPE_386SX, MACHINE_CHIPSET_ALI_M6117, machine_at_pja511m_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_M6117, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE, 1024, 32768, 1024, 127, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[ALi M6117] Protech ProX-1332", "prox1332", MACHINE_TYPE_386SX, CPU_PKG_M6117, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE, 1024, 32768, 1024, 127, machine_at_prox1332_init, NULL }, + { "[ALi M6117] Protech ProX-1332", "prox1332", MACHINE_TYPE_386SX, MACHINE_CHIPSET_ALI_M6117, machine_at_prox1332_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_M6117, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE, 1024, 32768, 1024, 127, NULL, NULL }, /* Has an AMI KBC firmware, the only photo of this is too low resolution for me to read what's on the KBC chip, so I'm going to assume AMI 'F' based on the other known HT18 AMI BIOS strings. */ - { "[HT18] AMA-932J", "ama932j", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE | MACHINE_VIDEO, 512, 8192, 128, 127, machine_at_ama932j_init, at_ama932j_get_device }, + { "[HT18] AMA-932J", "ama932j", MACHINE_TYPE_386SX, MACHINE_CHIPSET_HT18, machine_at_ama932j_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE | MACHINE_VIDEO, 512, 8192, 128, 127, at_ama932j_get_device }, /* Has an unknown KBC firmware with commands B8 and BB in the style of Phoenix MultiKey and AMIKey-3(!), but also commands E1 and EA with unknown functions. */ - { "[Intel 82335] ADI 386SX", "adi386sx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 8192, 128, 127, machine_at_adi386sx_init, NULL }, + { "[Intel 82335] ADI 386SX", "adi386sx", MACHINE_TYPE_386SX, MACHINE_CHIPSET_INTEL_82335, machine_at_adi386sx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 8192, 128, 127, NULL, NULL }, /* Has an AMI Keyboard BIOS PLUS KBC firmware ('8'). */ - { "[Intel 82335] Shuttle 386SX", "shuttle386sx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 8192, 128, 127, machine_at_shuttle386sx_init, NULL }, + { "[Intel 82335] Shuttle 386SX", "shuttle386sx", MACHINE_TYPE_386SX, MACHINE_CHIPSET_INTEL_82335, machine_at_shuttle386sx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 8192, 128, 127, NULL, NULL }, /* Uses Commodore (CBM) KBC firmware, to be implemented as identical to the IBM PS/2 Type 1 KBC firmware unless evidence emerges of any proprietary commands. */ - { "[NEAT] Commodore SL386SX-16", "cmdsl386sx16", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE, 1024, 8192, 512, 127, machine_at_cmdsl386sx16_init, NULL }, + { "[NEAT] Commodore SL386SX-16", "cmdsl386sx16", MACHINE_TYPE_386SX, MACHINE_CHIPSET_NEAT, machine_at_cmdsl386sx16_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE, 1024, 8192, 512, 127, NULL, NULL }, /* Has IBM AT KBC firmware. */ - { "[NEAT] DTK 386SX clone", "dtk386", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 8192, 128, 127, machine_at_neat_init, NULL }, + { "[NEAT] DTK 386SX clone", "dtk386", MACHINE_TYPE_386SX, MACHINE_CHIPSET_NEAT, machine_at_neat_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 8192, 128, 127, NULL, NULL }, /* Has IBM AT KBC firmware. */ - { "[OPTi 291] DTK PPM-3333P", "awardsx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 16384, 1024, 127, machine_at_awardsx_init, NULL }, + { "[OPTi 291] DTK PPM-3333P", "awardsx", MACHINE_TYPE_386SX, MACHINE_CHIPSET_OPTI_291, machine_at_awardsx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 1024, 16384, 1024, 127, NULL, NULL }, /* Uses Commodore (CBM) KBC firmware, to be implemented as identical to the IBM PS/2 Type 1 KBC firmware unless evidence emerges of any proprietary commands. */ - { "[SCAMP] Commodore SL386SX-25", "cmdsl386sx25", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 1024, 8192, 512, 127, machine_at_cmdsl386sx25_init, at_cmdsl386sx25_get_device }, + { "[SCAMP] Commodore SL386SX-25", "cmdsl386sx25", MACHINE_TYPE_386SX, MACHINE_CHIPSET_VLSI_SCAMP, machine_at_cmdsl386sx25_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 1024, 8192, 512, 127, at_cmdsl386sx25_get_device }, /* The closest BIOS string I find to this one's, differs only in one part, and ends in -8, so I'm going to assume that this, too, has an AMI '8' (AMI Keyboard BIOS Plus) KBC firmware. */ - { "[SCAMP] DataExpert 386SX", "dataexpert386sx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 10000000, 25000000, 0, 0, 0, 0, MACHINE_AT, 1024, 16384, 1024, 127, machine_at_dataexpert386sx_init, NULL }, + { "[SCAMP] DataExpert 386SX", "dataexpert386sx", MACHINE_TYPE_386SX, MACHINE_CHIPSET_VLSI_SCAMP, machine_at_dataexpert386sx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 10000000, 25000000, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 1024, 16384, 1024, 127, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[SCAMP] Samsung SPC-6033P", "spc6033p", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 12288, 2048, 127, machine_at_spc6033p_init, at_spc6033p_get_device }, + { "[SCAMP] Samsung SPC-6033P", "spc6033p", MACHINE_TYPE_386SX, MACHINE_CHIPSET_VLSI_SCAMP, machine_at_spc6033p_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 2048, 12288, 2048, 127, at_spc6033p_get_device }, /* Has an unknown AMI KBC firmware, I'm going to assume 'F' until a photo or real hardware BIOS string is found. */ - { "[SCAT] KMX-C-02", "kmxc02", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 512, 127, machine_at_kmxc02_init, NULL }, + { "[SCAT] KMX-C-02", "kmxc02", MACHINE_TYPE_386SX, MACHINE_CHIPSET_SCAT, machine_at_kmxc02_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 16384, 512, 127, NULL, NULL }, /* Has Quadtel KBC firmware. */ - { "[WD76C10] Amstrad MegaPC", "megapc", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 1024, 32768, 1024, 127, machine_at_wd76c10_init, NULL }, + { "[WD76C10] Amstrad MegaPC", "megapc", MACHINE_TYPE_386SX, MACHINE_CHIPSET_WD76C10, machine_at_wd76c10_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 1024, 32768, 1024, 127, NULL, NULL }, /* 386SX machines which utilize the MCA bus */ /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[MCA] IBM PS/2 model 55SX", "ibmps2_m55sx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_MCA | MACHINE_BUS_PS2 | MACHINE_VIDEO, 1024, 8192, 1024, 63, machine_ps2_model_55sx_init, NULL }, + { "[MCA] IBM PS/2 model 55SX", "ibmps2_m55sx", MACHINE_TYPE_386SX, MACHINE_CHIPSET_PROPRIETARY, machine_ps2_model_55sx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_MCA, MACHINE_VIDEO, 1024, 8192, 1024, 63, NULL, NULL }, /* 486SLC machines */ /* 486SLC machines with just the ISA slot */ /* Has AMIKey H KBC firmware. */ - { "[OPTi 283] RYC Leopard LX", "rycleopardlx", MACHINE_TYPE_486SLC, CPU_PKG_486SLC_IBM, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 16384, 1024, 127, machine_at_rycleopardlx_init, NULL }, + { "[OPTi 283] RYC Leopard LX", "rycleopardlx", MACHINE_TYPE_486SLC, MACHINE_CHIPSET_OPTI_283, machine_at_rycleopardlx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_486SLC_IBM, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 1024, 16384, 1024, 127, NULL, NULL }, /* 386DX machines */ - { "[ACC 2168] AMI 386DX clone", "acc386", MACHINE_TYPE_386DX, CPU_PKG_386DX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 16384, 1024, 127, machine_at_acc386_init, NULL }, + { "[ACC 2168] AMI 386DX clone", "acc386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_ACC_2168, machine_at_acc386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 1024, 16384, 1024, 127, NULL, NULL }, /* Has an AMI Keyboard BIOS PLUS KBC firmware ('8'). */ - { "[C&T 386] ECS 386/32", "ecs386", MACHINE_TYPE_386DX, CPU_PKG_386DX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 16384, 1024, 127, machine_at_ecs386_init, NULL }, + { "[C&T 386] ECS 386/32", "ecs386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_CT_386, machine_at_ecs386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 1024, 16384, 1024, 127, NULL, NULL }, /* Has IBM AT KBC firmware. */ - { "[C&T 386] Samsung SPC-6000A", "spc6000a", MACHINE_TYPE_386DX, CPU_PKG_386DX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE, 1024, 32768, 1024, 127, machine_at_spc6000a_init, NULL }, + { "[C&T 386] Samsung SPC-6000A", "spc6000a", MACHINE_TYPE_386DX, MACHINE_CHIPSET_CT_386, machine_at_spc6000a_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE, 1024, 32768, 1024, 127, NULL, NULL }, /* Uses Compaq KBC firmware. */ - { "[ISA] Compaq Deskpro 386", "deskpro386", MACHINE_TYPE_386DX, CPU_PKG_386DX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE, 1024, 14336, 1024, 127, machine_at_deskpro386_init, NULL }, - { "[ISA] Compaq Portable III (386)", "portableiii386", MACHINE_TYPE_386DX, CPU_PKG_386DX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE | MACHINE_VIDEO, 1024, 14336, 1024, 127, machine_at_portableiii386_init, at_cpqiii_get_device }, + { "[ISA] Compaq Deskpro 386", "deskpro386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_DISCRETE, machine_at_deskpro386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE, 1024, 14336, 1024, 127, NULL, NULL }, + { "[ISA] Compaq Portable III (386)", "portableiii386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_DISCRETE, machine_at_portableiii386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE | MACHINE_VIDEO, 1024, 14336, 1024, 127, at_cpqiii_get_device }, /* Has IBM AT KBC firmware. */ - { "[ISA] Micronics 09-00021", "micronics386", MACHINE_TYPE_386DX, CPU_PKG_386DX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 8192, 128, 127, machine_at_micronics386_init, NULL }, + { "[ISA] Micronics 09-00021", "micronics386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_DISCRETE, machine_at_micronics386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 8192, 128, 127, NULL, NULL }, /* Has AMIKey F KBC firmware. */ - { "[SiS 310] ASUS ISA-386C", "asus386", MACHINE_TYPE_386DX, CPU_PKG_386DX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 65536, 1024, 127, machine_at_asus386_init, NULL }, + { "[SiS 310] ASUS ISA-386C", "asus386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_SIS_310, machine_at_asus386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 1024, 65536, 1024, 127, NULL, NULL }, /* 386DX machines which utilize the MCA bus */ /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[MCA] IBM PS/2 model 70 (type 3)", "ibmps2_m70_type3", MACHINE_TYPE_386DX, CPU_PKG_386DX | CPU_PKG_486BL, 0, 0, 0, 0, 0, 0, 0, MACHINE_MCA | MACHINE_BUS_PS2 | MACHINE_VIDEO, 2048, 65536, 2048, 63, machine_ps2_model_70_type3_init, NULL }, + { "[MCA] IBM PS/2 model 70 (type 3)", "ibmps2_m70_type3", MACHINE_TYPE_386DX, MACHINE_CHIPSET_PROPRIETARY, machine_ps2_model_70_type3_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX | CPU_PKG_486BL, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_MCA, MACHINE_VIDEO, 2048, 65536, 2048, 63, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[MCA] IBM PS/2 model 80 (type 2)", "ibmps2_m80", MACHINE_TYPE_386DX, CPU_PKG_386DX | CPU_PKG_486BL | CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_MCA | MACHINE_BUS_PS2 | MACHINE_VIDEO, 1024, 65536, 1024, 63, machine_ps2_model_80_init, NULL }, + { "[MCA] IBM PS/2 model 80 (type 2)", "ibmps2_m80", MACHINE_TYPE_386DX, MACHINE_CHIPSET_PROPRIETARY, machine_ps2_model_80_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX | CPU_PKG_486BL | CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_MCA, MACHINE_VIDEO, 1024, 65536, 1024, 63, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[MCA] IBM PS/2 model 80 (type 3)", "ibmps2_m80_type3", MACHINE_TYPE_386DX, CPU_PKG_386DX | CPU_PKG_486BL | CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_MCA | MACHINE_BUS_PS2 | MACHINE_VIDEO, 2048, 65536, 2048, 63, machine_ps2_model_80_axx_init, NULL }, + { "[MCA] IBM PS/2 model 80 (type 3)", "ibmps2_m80_type3", MACHINE_TYPE_386DX, MACHINE_CHIPSET_PROPRIETARY, machine_ps2_model_80_axx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX | CPU_PKG_486BL | CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_MCA, MACHINE_VIDEO, 2048, 65536, 2048, 63, NULL, NULL }, /* 386DX/486 machines */ /* The BIOS sends commands C9 without a parameter and D5, both of which are Phoenix MultiKey commands. */ - { "[OPTi 495] Award 486 clone", "award495", MACHINE_TYPE_386DX_486, CPU_PKG_386DX | CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024, 32768, 1024, 127, machine_at_opti495_init, NULL }, + { "[OPTi 495] Award 486 clone", "award495", MACHINE_TYPE_386DX_486, MACHINE_CHIPSET_OPTI_495, machine_at_opti495_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX | CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE, 1024, 32768, 1024, 127, NULL, NULL }, /* Has AMIKey F KBC firmware. */ - { "[OPTi 495] DataExpert SX495", "ami495", MACHINE_TYPE_386DX_486, CPU_PKG_386DX | CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024, 32768, 1024, 127, machine_at_opti495_ami_init, NULL }, + { "[OPTi 495] DataExpert SX495", "ami495", MACHINE_TYPE_386DX_486, MACHINE_CHIPSET_OPTI_495, machine_at_opti495_ami_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX | CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE, 1024, 32768, 1024, 127, NULL, NULL }, /* Has AMIKey F KBC firmware (it's just the MR BIOS for the above machine). */ - { "[OPTi 495] DataExpert SX495 (MR BIOS)", "mr495", MACHINE_TYPE_386DX_486, CPU_PKG_386DX | CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024, 32768, 1024, 127, machine_at_opti495_mr_init, NULL }, + { "[OPTi 495] DataExpert SX495 (MR BIOS)", "mr495", MACHINE_TYPE_386DX_486, MACHINE_CHIPSET_OPTI_495, machine_at_opti495_mr_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX | CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE, 1024, 32768, 1024, 127, NULL, NULL }, /* 486 machines - Socket 1 */ /* Has JetKey 5 KBC Firmware which looks like it is a clone of AMIKey type F. @@ -333,161 +414,161 @@ const machine_t machines[] = { supposedly sends command EF. The board was also seen in 2003 with a -H string - perhaps someone swapped the KBC? */ - { "[ALi M1429] Olystar LIL1429", "ali1429", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024, 32768, 1024, 127, machine_at_ali1429_init, NULL }, + { "[ALi M1429] Olystar LIL1429", "ali1429", MACHINE_TYPE_486, MACHINE_CHIPSET_ALI_M1429, machine_at_ali1429_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE, 1024, 32768, 1024, 127, NULL, NULL }, /* Has JetKey 5 KBC Firmware - but the BIOS string ends in a hardcoded -F, and the BIOS also explicitly expects command A1 to return a 'F', so it looks like the JetKey 5 is a clone of AMIKey type F. */ - { "[CS4031] AMI 486 CS4031", "cs4031", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB, 1024, 65536, 1024, 127, machine_at_cs4031_init, NULL }, + { "[CS4031] AMI 486 CS4031", "cs4031", MACHINE_TYPE_486, MACHINE_CHIPSET_CT_CS4031, machine_at_cs4031_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_FLAGS_NONE, 1024, 65536, 1024, 127, NULL, NULL }, /* Uses some variant of Phoenix MultiKey/42 as the Intel 8242 chip has a Phoenix copyright. */ - { "[OPTi 895] Mylex MVI486", "mvi486", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE_DUAL, 1024, 65536, 1024, 127, machine_at_mvi486_init, NULL }, + { "[OPTi 895] Mylex MVI486", "mvi486", MACHINE_TYPE_486, MACHINE_CHIPSET_OPTI_895_802G, machine_at_mvi486_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE_DUAL, 1024, 65536, 1024, 127, NULL, NULL }, /* Has AMI KF KBC firmware. */ - { "[SiS 401] ASUS ISA-486", "isa486", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE, 1024, 65536, 1024, 127, machine_at_isa486_init, NULL }, + { "[SiS 401] ASUS ISA-486", "isa486", MACHINE_TYPE_486, MACHINE_CHIPSET_SIS_401, machine_at_isa486_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE, 1024, 65536, 1024, 127, NULL, NULL }, /* Has AMIKey H KBC firmware, per the screenshot in "How computers & MS-DOS work". */ - { "[SiS 401] Chaintech 433SC", "sis401", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE, 1024, 65536, 1024, 127, machine_at_sis401_init, NULL }, + { "[SiS 401] Chaintech 433SC", "sis401", MACHINE_TYPE_486, MACHINE_CHIPSET_SIS_401, machine_at_sis401_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE, 1024, 65536, 1024, 127, NULL, NULL }, /* Has AMIKey F KBC firmware, per a photo of a monitor with the BIOS screen on eBay. */ - { "[SiS 460] ABIT AV4", "av4", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024, 65536, 1024, 127, machine_at_av4_init, NULL }, + { "[SiS 460] ABIT AV4", "av4", MACHINE_TYPE_486, MACHINE_CHIPSET_SIS_460, machine_at_av4_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE, 1024, 65536, 1024, 127, NULL, NULL }, /* Has a MR (!) KBC firmware, which is a clone of the standard IBM PS/2 KBC firmware. */ - { "[SiS 471] SiS VL-BUS 471 REV. A1", "px471", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024,131072, 1024, 127, machine_at_px471_init, NULL }, + { "[SiS 471] SiS VL-BUS 471 REV. A1", "px471", MACHINE_TYPE_486, MACHINE_CHIPSET_SIS_471, machine_at_px471_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE, 1024, 131072, 1024, 127, NULL, NULL }, /* The chip is a Lance LT38C41, a clone of the Intel 8041, and the BIOS sends commands BC, BD, and C9 which exist on both AMIKey and Phoenix MultiKey/42, but it does not write a byte after C9, which is consistent with AMIKey, so this must have some form of AMIKey. */ - { "[VIA VT82C495] FIC 486-VC-HD", "486vchd", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 64512, 1024, 127, machine_at_486vchd_init, NULL }, + { "[VIA VT82C495] FIC 486-VC-HD", "486vchd", MACHINE_TYPE_486, MACHINE_CHIPSET_VIA_VT82C495, machine_at_486vchd_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 1024, 64512, 1024, 127, NULL, NULL }, /* According to Deksor on the Win3x.org forum, the BIOS string ends in a -0, indicating an unknown KBC firmware. But it does send the AMIKey get version command, so it must expect an AMIKey. */ - { "[VLSI 82C480] HP Vectra 486VL", "vect486vl", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 32768, 2048, 127, machine_at_vect486vl_init, at_vect486vl_get_device }, + { "[VLSI 82C480] HP Vectra 486VL", "vect486vl", MACHINE_TYPE_486, MACHINE_CHIPSET_VLSI_VL82C480, machine_at_vect486vl_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 2048, 32768, 2048, 127, at_vect486vl_get_device }, /* Has a standard IBM PS/2 KBC firmware or a clone thereof. */ - { "[VLSI 82C481] Siemens Nixdorf D824", "d824", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 32768, 2048, 127, machine_at_d824_init, at_d824_get_device }, + { "[VLSI 82C481] Siemens Nixdorf D824", "d824", MACHINE_TYPE_486, MACHINE_CHIPSET_VLSI_VL82C481, machine_at_d824_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 2048, 32768, 2048, 127, at_d824_get_device }, /* 486 machines - Socket 2 */ /* 486 machines with just the ISA slot */ /* Uses some variant of Phoenix MultiKey/42 as the BIOS sends keyboard controller command C7 (OR input byte with received data byte). */ - { "[ACC 2168] Packard Bell PB410A", "pb410a", MACHINE_TYPE_486_S2, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 4096, 36864, 1024, 127, machine_at_pb410a_init, NULL }, + { "[ACC 2168] Packard Bell PB410A", "pb410a", MACHINE_TYPE_486_S2, MACHINE_CHIPSET_ACC_2168, machine_at_pb410a_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 4096, 36864, 1024, 127, NULL, NULL }, /* Uses an ACER/NEC 90M002A (UPD82C42C, 8042 clone) with unknown firmware (V4.01H). */ - { "[ALi M1429G] Acer A1G", "acera1g", MACHINE_TYPE_486_S2, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 4096, 36864, 1024, 127, machine_at_acera1g_init, at_acera1g_get_device }, + { "[ALi M1429G] Acer A1G", "acera1g", MACHINE_TYPE_486_S2, MACHINE_CHIPSET_ALI_M1429G, machine_at_acera1g_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE_DUAL | MACHINE_VIDEO, 4096, 36864, 1024, 127, at_acera1g_get_device }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[ALi M1429G] Kaimei SA-486 VL-BUS M.B.", "win486", MACHINE_TYPE_486_S2, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024, 32768, 1024, 127, machine_at_winbios1429_init, NULL }, + { "[ALi M1429G] Kaimei SA-486 VL-BUS M.B.", "win486", MACHINE_TYPE_486_S2, MACHINE_CHIPSET_ALI_M1429G, machine_at_winbios1429_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE, 1024, 32768, 1024, 127, NULL, NULL }, /* Uses an Intel KBC with Phoenix MultiKey KBC firmware. */ - { "[SiS 461] DEC DECpc LPV", "decpclpv", MACHINE_TYPE_486_S2, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 1024, 32768, 1024, 127, machine_at_decpclpv_init, NULL }, + { "[SiS 461] DEC DECpc LPV", "decpclpv", MACHINE_TYPE_486_S2, MACHINE_CHIPSET_SIS_461, machine_at_decpclpv_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE_DUAL | MACHINE_VIDEO, 1024, 32768, 1024, 127, NULL, NULL }, /* Uses an NEC 90M002A (UPD82C42C, 8042 clone) with unknown firmware. */ - { "[SiS 461] Acer V10", "acerv10", MACHINE_TYPE_486_S2, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 1024, 32768, 1024, 127, machine_at_acerv10_init, NULL }, + { "[SiS 461] Acer V10", "acerv10", MACHINE_TYPE_486_S2, MACHINE_CHIPSET_SIS_461, machine_at_acerv10_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE_DUAL | MACHINE_VIDEO, 1024, 32768, 1024, 127, NULL, NULL }, /* The BIOS does not send any non-standard keyboard controller commands and wants a PS/2 mouse, so it's an IBM PS/2 KBC (Type 1) firmware. */ - { "[SiS 461] IBM PS/ValuePoint 433DX/Si", "valuepoint433", MACHINE_TYPE_486_S2, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 1024, 65536, 1024, 127, machine_at_valuepoint433_init, NULL }, + { "[SiS 461] IBM PS/ValuePoint 433DX/Si", "valuepoint433", MACHINE_TYPE_486_S2, MACHINE_CHIPSET_SIS_461, machine_at_valuepoint433_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 1024, 65536, 1024, 127, NULL, NULL }, /* The BIOS string ends in -U, unless command 0xA1 (AMIKey get version) returns an 'F', in which case, it ends in -F, so it has an AMIKey F KBC firmware. The photo of the board shows an AMIKey KBC which is indeed F. */ - { "[SiS 471] ABit AB-AH4", "win471", MACHINE_TYPE_486_S2, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024, 65536, 1024, 127, machine_at_win471_init, NULL }, + { "[SiS 471] ABit AB-AH4", "win471", MACHINE_TYPE_486_S2, MACHINE_CHIPSET_SIS_471, machine_at_win471_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE, 1024, 65536, 1024, 127, NULL, NULL }, /* 486 machines - Socket 3 */ /* 486 machines with just the ISA slot */ /* Has AMI MegaKey KBC firmware. */ - { "[Contaq 82C597] Green-B", "greenb", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB, 1024, 65536, 1024, 127, machine_at_greenb_init, NULL }, + { "[Contaq 82C597] Green-B", "greenb", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_CONTAQ_82C597, machine_at_greenb_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_FLAGS_NONE, 1024, 65536, 1024, 127, NULL, NULL }, /* Has a VIA VT82C42N KBC. */ - { "[OPTi 895] Jetway J-403TG", "403tg", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB, 1024, 65536, 1024, 127, machine_at_403tg_init, NULL }, + { "[OPTi 895] Jetway J-403TG", "403tg", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_OPTI_895_802G, machine_at_403tg_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_FLAGS_NONE, 1024, 65536, 1024, 127, NULL, NULL }, /* Has JetKey 5 KBC Firmware which looks like it is a clone of AMIKey type F. */ - { "[OPTi 895] Jetway J-403TG Rev D", "403tg_d", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB, 1024, 65536, 1024, 127, machine_at_403tg_d_init, NULL }, + { "[OPTi 895] Jetway J-403TG Rev D", "403tg_d", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_OPTI_895_802G, machine_at_403tg_d_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_FLAGS_NONE, 1024, 65536, 1024, 127, NULL, NULL }, /* Has JetKey 5 KBC Firmware which looks like it is a clone of AMIKey type F. */ - { "[OPTi 895] Jetway J-403TG Rev D (MR BIOS)","403tg_d_mr", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB, 1024, 65536, 1024, 127, machine_at_403tg_d_mr_init, NULL }, + { "[OPTi 895] Jetway J-403TG Rev D (MR BIOS)", "403tg_d_mr", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_OPTI_895_802G, machine_at_403tg_d_mr_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_FLAGS_NONE, 1024, 65536, 1024, 127, NULL, NULL }, /* Has AMIKey H keyboard BIOS. */ - { "[SiS 471] AOpen Vi15G", "vi15g", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024, 65536, 1024, 127, machine_at_vi15g_init, NULL }, + { "[SiS 471] AOpen Vi15G", "vi15g", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_SIS_471, machine_at_vi15g_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE, 1024, 65536, 1024, 127, NULL, NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[SiS 471] ASUS VL/I-486SV2G (GX4)", "vli486sv2g", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024, 65536, 1024, 127, machine_at_vli486sv2g_init, NULL }, + { "[SiS 471] ASUS VL/I-486SV2G (GX4)", "vli486sv2g", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_SIS_471, machine_at_vli486sv2g_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_VLB, MACHINE_IDE_DUAL, 1024, 65536, 1024, 127, NULL, NULL }, /* Has JetKey 5 KBC Firmware which looks like it is a clone of AMIKey type F. */ - { "[SiS 471] DTK PKM-0038S E-2", "dtk486", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024, 65536, 1024, 127, machine_at_dtk486_init, NULL }, + { "[SiS 471] DTK PKM-0038S E-2", "dtk486", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_SIS_471, machine_at_dtk486_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE, 1024, 65536, 1024, 127, NULL, NULL }, /* Unknown Epox VLB Socket 3 board, has AMIKey F keyboard BIOS. */ - { "[SiS 471] Epox 486SX/DX Green", "ami471", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE, 1024, 65536, 1024, 127, machine_at_ami471_init, NULL }, + { "[SiS 471] Epox 486SX/DX Green", "ami471", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_SIS_471, machine_at_ami471_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE, 1024, 65536, 1024, 127, NULL, NULL }, /* 486 machines which utilize the PCI bus */ /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[ALi M1489] AAEON SBC-490", "sbc490", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 1024, 65536, 1024, 255, machine_at_sbc490_init, at_sbc490_get_device }, + { "[ALi M1489] AAEON SBC-490", "sbc490", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_ALI_M1489, machine_at_sbc490_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 1024, 65536, 1024, 255, at_sbc490_get_device }, /* Has the ALi M1487/9's on-chip keyboard controller which clones a standard AT KBC. */ - { "[ALi M1489] ABIT AB-PB4", "abpb4", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, machine_at_abpb4_init, NULL }, + { "[ALi M1489] ABIT AB-PB4", "abpb4", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_ALI_M1489, machine_at_abpb4_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCI, MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, NULL, NULL }, /* Has the ALi M1487/9's on-chip keyboard controller which clones a standard AT KBC. The BIOS string always ends in -U, but the BIOS will send AMIKey commands 0xCA and 0xCB if command 0xA1 returns a letter in the 0x5x or 0x7x ranges, so I'm going to give it an AMI 'U' KBC. */ - { "[ALi M1489] AMI WinBIOS 486 PCI", "win486pci", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, machine_at_win486pci_init, NULL }, + { "[ALi M1489] AMI WinBIOS 486 PCI", "win486pci", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_ALI_M1489, machine_at_win486pci_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCI, MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, NULL, NULL }, /* Has the ALi M1487/9's on-chip keyboard controller which clones a standard AT KBC. The known BIOS string ends in -E, and the BIOS returns whatever command 0xA1 returns (but only if command 0xA1 is instant response), so said ALi keyboard controller likely returns 'E'. */ - { "[ALi M1489] MSI MS-4145", "ms4145", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, machine_at_ms4145_init, NULL }, + { "[ALi M1489] MSI MS-4145", "ms4145", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_ALI_M1489, machine_at_ms4145_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCI, MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, NULL, NULL }, /* Has an ALi M5042 keyboard controller with Phoenix MultiKey/42 v1.40 firmware. */ - { "[ALi M1489] ESA TF-486", "tf486", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, machine_at_tf486_init, NULL }, + { "[ALi M1489] ESA TF-486", "tf486", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_ALI_M1489, machine_at_tf486_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[OPTi 802G] IBM PC 330 (type 6573)", "pc330_6573", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3_PC330, 0, 25000000, 33333333, 0, 0, 2.0, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE, 1024, 65536, 1024, 127, machine_at_pc330_6573_init, NULL }, + { "[OPTi 802G] IBM PC 330 (type 6573)", "pc330_6573", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_OPTI_895_802G, machine_at_pc330_6573_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3_PC330, CPU_BLOCK_NONE, 25000000, 33333333, 0, 0, 2.0, 3.0, MACHINE_PS2_PCI, MACHINE_IDE, 1024, 65536, 1024, 127, NULL, NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[i420EX] ASUS PVI-486AP4", "486ap4", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCIV | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024, 131072, 1024, 127, machine_at_486ap4_init, NULL }, + { "[i420EX] ASUS PVI-486AP4", "486ap4", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_INTEL_420EX, machine_at_486ap4_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCIV, MACHINE_IDE_DUAL, 1024, 131072, 1024, 127, NULL, NULL }, /* This has the Phoenix MultiKey KBC firmware. */ - { "[i420EX] Intel Classic/PCI ED", "ninja", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024, 131072, 1024, 127, machine_at_ninja_init, NULL }, + { "[i420EX] Intel Classic/PCI ED", "ninja", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_INTEL_420EX, machine_at_ninja_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 1024, 131072, 1024, 127, NULL, NULL }, + /* I'm going to assume this as an AMIKey-2 like the other two 486SP3's. */ + { "[i420TX] ASUS PCI/I-486SP3", "486sp3", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_INTEL_420TX, machine_at_486sp3_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCI, MACHINE_IDE_DUAL | MACHINE_SCSI, 1024, 131072, 1024, 127, NULL, NULL }, + /* This has the Phoenix MultiKey KBC firmware. */ + { "[i420TX] Intel Classic/PCI", "alfredo", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_INTEL_420TX, machine_at_alfredo_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. Also has a SST 29EE010 Flash chip. */ - { "[i420ZX] ASUS PCI/I-486SP3G", "486sp3g", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_SCSI, 1024, 131072, 1024, 127, machine_at_486sp3g_init, NULL }, - /* I'm going to assume this as an AMIKey-2 like the other two 486SP3's. */ - { "[i420TX] ASUS PCI/I-486SP3", "486sp3", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL | MACHINE_SCSI, 1024, 131072, 1024, 127, machine_at_486sp3_init, NULL }, - /* This has the Phoenix MultiKey KBC firmware. */ - { "[i420TX] Intel Classic/PCI", "alfredo", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_alfredo_init, NULL }, + { "[i420ZX] ASUS PCI/I-486SP3G", "486sp3g", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_INTEL_420ZX, machine_at_486sp3g_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_SCSI, 1024, 131072, 1024, 127, NULL, NULL }, /* This most likely has a standalone AMI Megakey 1993, which is type 'P', like the below Tekram board. */ - { "[IMS 8848] J-Bond PCI400C-B", "pci400cb", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_pci400cb_init, NULL }, + { "[IMS 8848] J-Bond PCI400C-B", "pci400cb", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_IMS_8848, machine_at_pci400cb_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* This has a standalone AMI Megakey 1993, which is type 'P'. */ - { "[IMS 8848] Tekram G486IP", "g486ip", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_g486ip_init, NULL }, + { "[IMS 8848] Tekram G486IP", "g486ip", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_IMS_8848, machine_at_g486ip_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[SiS 496] ASUS PVI-486SP3C", "486sp3c", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCIV | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024, 261120, 1024, 255, machine_at_486sp3c_init, NULL }, + { "[SiS 496] ASUS PVI-486SP3C", "486sp3c", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_SIS_496, machine_at_486sp3c_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCIV, MACHINE_IDE_DUAL, 1024, 261120, 1024, 255, NULL, NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[SiS 496] Lucky Star LS-486E", "ls486e", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, machine_at_ls486e_init, NULL }, + { "[SiS 496] Lucky Star LS-486E", "ls486e", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_SIS_496, machine_at_ls486e_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCI, MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, NULL, NULL }, /* The BIOS does not send a single non-standard KBC command, so it has a standard PS/2 KBC. */ - { "[SiS 496] Micronics M4Li", "m4li", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024, 131072, 1024, 127, machine_at_m4li_init, NULL }, + { "[SiS 496] Micronics M4Li", "m4li", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_SIS_496, machine_at_m4li_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 1024, 131072, 1024, 127, NULL, NULL }, /* Has a BestKey KBC which clones AMI type 'H'. */ - { "[SiS 496] Rise Computer R418", "r418", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 261120, 1024, 255, machine_at_r418_init, NULL }, + { "[SiS 496] Rise Computer R418", "r418", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_SIS_496, machine_at_r418_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCI, MACHINE_IDE_DUAL, 1024, 261120, 1024, 255, NULL, NULL }, /* This has a Holtek KBC and the BIOS does not send a single non-standard KBC command, so it must be an ASIC that clones the standard IBM PS/2 KBC. */ - { "[SiS 496] Soyo 4SAW2", "4saw2", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, CPU_BLOCK(CPU_i486SX, CPU_i486DX, CPU_Am486SX, CPU_Am486DX), 0, 0, 0, 0, 0, 0, MACHINE_PCIV | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024, 261120, 1024, 255, machine_at_4saw2_init, NULL }, + { "[SiS 496] Soyo 4SAW2", "4saw2", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_SIS_496, machine_at_4saw2_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_SOYO_4SAW2, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCIV, MACHINE_IDE_DUAL, 1024, 261120, 1024, 255, NULL, NULL }, /* According to MrKsoft, his real 4DPS has an AMIKey-2, which is an updated version of type 'H'. */ - { "[SiS 496] Zida Tomato 4DP", "4dps", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024, 261120, 1024, 255, machine_at_4dps_init, NULL }, + { "[SiS 496] Zida Tomato 4DP", "4dps", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_SIS_496, machine_at_4dps_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 1024, 261120, 1024, 255, NULL, NULL }, /* This has the UMC 88xx on-chip KBC. */ - { "[UMC 8881] A-Trend ATC-1415", "atc1415", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, machine_at_atc1415_init, NULL }, + { "[UMC 8881] A-Trend ATC-1415", "atc1415", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_UMC_UM8881, machine_at_atc1415_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCI, MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, NULL, NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[UMC 8881] ECS Elite UM8810PAIO", "ecs486", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, machine_at_ecs486_init, NULL }, + { "[UMC 8881] ECS Elite UM8810PAIO", "ecs486", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_UMC_UM8881, machine_at_ecs486_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCI, MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, NULL, NULL }, /* Has AMIKey Z(!) KBC firmware. */ - { "[UMC 8881] Epson Action PC 2600", "actionpc2600", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 262144, 1024, 255, machine_at_actionpc2600_init, NULL }, + { "[UMC 8881] Epson Action PC 2600", "actionpc2600", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_UMC_UM8881, machine_at_actionpc2600_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCI, MACHINE_IDE_DUAL, 1024, 262144, 1024, 255, NULL, NULL }, /* This has the UMC 88xx on-chip KBC. All the copies of the BIOS string I can find, end in in -H, so the UMC on-chip KBC likely emulates the AMI 'H' KBC firmware. */ - { "[UMC 8881] PC Chips M919", "m919", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_VLB | MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, machine_at_m919_init, NULL }, + { "[UMC 8881] PC Chips M919", "m919", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_UMC_UM8881, machine_at_m919_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCIV, MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. Uses a mysterious I/O port C05. */ - { "[UMC 8881] Samsung SPC7700P-LW", "spc7700plw", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, machine_at_spc7700plw_init, NULL }, + { "[UMC 8881] Samsung SPC7700P-LW", "spc7700plw", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_UMC_UM8881, machine_at_spc7700plw_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, NULL, NULL }, /* This has a Holtek KBC. */ - { "[UMC 8881] Shuttle HOT-433A", "hot433", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCI | MACHINE_IDE_DUAL, 1024, 262144, 1024, 255, machine_at_hot433_init, NULL }, + { "[UMC 8881] Shuttle HOT-433A", "hot433", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_UMC_UM8881, machine_at_hot433_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCI, MACHINE_IDE_DUAL, 1024, 262144, 1024, 255, NULL, NULL }, /* Has a VIA VT82C406 KBC+RTC that likely has identical commands to the VT82C42N. */ - { "[VIA VT82C496G] DFI G486VPA", "g486vpa", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCIV | MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, machine_at_g486vpa_init, NULL }, + { "[VIA VT82C496G] DFI G486VPA", "g486vpa", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_VIA_VT82C496G, machine_at_g486vpa_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCIV, MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, NULL, NULL }, /* Has a VIA VT82C42N KBC. */ - { "[VIA VT82C496G] FIC VIP-IO2", "486vipio2", MACHINE_TYPE_486_S3, CPU_PKG_SOCKET3, 0, 0, 0, 0, 0, 0, 0, MACHINE_PCIV | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, machine_at_486vipio2_init, NULL }, + { "[VIA VT82C496G] FIC VIP-IO2", "486vipio2", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_VIA_VT82C496G, machine_at_486vipio2_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCIV, MACHINE_IDE_DUAL, 1024, 131072, 1024, 255, NULL, NULL }, /* 486 machines - Miscellaneous */ /* 486 machines which utilize the PCI bus */ /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[STPC Client] ITOX STAR", "itoxstar", MACHINE_TYPE_486_MISC, CPU_PKG_STPC, 0, 66666667, 75000000, 0, 0, 1.0, 1.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 255, machine_at_itoxstar_init, NULL }, + { "[STPC Client] ITOX STAR", "itoxstar", MACHINE_TYPE_486_MISC, MACHINE_CHIPSET_STPC_CLIENT, machine_at_itoxstar_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_STPC, CPU_BLOCK_NONE, 66666667, 75000000, 0, 0, 1.0, 1.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 255, NULL, NULL }, /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[STPC Consumer-II] Acrosser AR-B1423C", "arb1423c", MACHINE_TYPE_486_MISC, CPU_PKG_STPC, 0, 66666667, 66666667, 0, 0, 2.0, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 32768, 163840, 8192, 255, machine_at_arb1423c_init, NULL }, + { "[STPC Consumer-II] Acrosser AR-B1423C", "arb1423c", MACHINE_TYPE_486_MISC, MACHINE_CHIPSET_STPC_CONSUMER_II, machine_at_arb1423c_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_STPC, CPU_BLOCK_NONE, 66666667, 66666667, 0, 0, 2.0, 2.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 32768, 163840, 8192, 255, NULL, NULL }, /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[STPC Consumer-II] Acrosser AR-B1479", "arb1479", MACHINE_TYPE_486_MISC, CPU_PKG_STPC, 0, 66666667, 66666667, 0, 0, 2.0, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 32768, 163840, 8192, 255, machine_at_arb1479_init, NULL }, + { "[STPC Consumer-II] Acrosser AR-B1479", "arb1479", MACHINE_TYPE_486_MISC, MACHINE_CHIPSET_STPC_CONSUMER_II, machine_at_arb1479_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_STPC, CPU_BLOCK_NONE, 66666667, 66666667, 0, 0, 2.0, 2.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 32768, 163840, 8192, 255, NULL, NULL }, /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[STPC Elite] Advantech PCM-9340", "pcm9340", MACHINE_TYPE_486_MISC, CPU_PKG_STPC, 0, 66666667, 66666667, 0, 0, 2.0, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 32768, 98304, 8192, 255, machine_at_pcm9340_init, NULL }, + { "[STPC Elite] Advantech PCM-9340", "pcm9340", MACHINE_TYPE_486_MISC, MACHINE_CHIPSET_STPC_ELITE, machine_at_pcm9340_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_STPC, CPU_BLOCK_NONE, 66666667, 66666667, 0, 0, 2.0, 2.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 32768, 98304, 8192, 255, NULL, NULL }, /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[STPC Atlas] AAEON PCM-5330", "pcm5330", MACHINE_TYPE_486_MISC, CPU_PKG_STPC, 0, 66666667, 66666667, 0, 0, 2.0, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 32768, 131072,32768, 255, machine_at_pcm5330_init, NULL }, + { "[STPC Atlas] AAEON PCM-5330", "pcm5330", MACHINE_TYPE_486_MISC, MACHINE_CHIPSET_STPC_ATLAS, machine_at_pcm5330_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_STPC, CPU_BLOCK_NONE, 66666667, 66666667, 0, 0, 2.0, 2.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 32768, 131072,32768, 255, NULL, NULL }, /* Socket 4 machines */ /* 430LX */ @@ -496,469 +577,473 @@ const machine_t machines[] = { connector. The boot block for BIOS recovery requires an unknown bit on port 805h to be clear. */ - { "[i430LX] AMI Excalibur PCI Pentium", "excaliburpci", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_excaliburpci_init, NULL }, + { "[i430LX] AMI Excalibur PCI Pentium", "excaliburpci", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_INTEL_430LX, machine_at_excaliburpci_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* Has AMIKey F KBC firmware (AMIKey). */ - { "[i430LX] ASUS P/I-P5MP3", "p5mp3", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE, 2048, 196608, 2048, 127, machine_at_p5mp3_init, NULL }, + { "[i430LX] ASUS P/I-P5MP3", "p5mp3", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_INTEL_430LX, machine_at_p5mp3_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE, 2048, 196608, 2048, 127, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[i430LX] Dell Dimension XPS P60", "dellxp60", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE, 2048, 131072, 2048, 127, machine_at_dellxp60_init, NULL }, + { "[i430LX] Dell Dimension XPS P60", "dellxp60", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_INTEL_430LX, machine_at_dellxp60_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE, 2048, 131072, 2048, 127, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[i430LX] Dell OptiPlex 560/L", "opti560l", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_opti560l_init, NULL }, + { "[i430LX] Dell OptiPlex 560/L", "opti560l", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_INTEL_430LX, machine_at_opti560l_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* This has the Phoenix MultiKey KBC firmware. This is basically an Intel Batman (*NOT* Batman's Revenge) with a fancier POST screen */ - { "[i430LX] AMBRA DP60 PCI", "ambradp60", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_ambradp60_init, NULL }, + { "[i430LX] AMBRA DP60 PCI", "ambradp60", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_INTEL_430LX, machine_at_ambradp60_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[i430LX] IBM PS/ValuePoint P60", "valuepointp60", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_valuepointp60_init, NULL }, + { "[i430LX] IBM PS/ValuePoint P60", "valuepointp60", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_INTEL_430LX, machine_at_valuepointp60_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* This has the Phoenix MultiKey KBC firmware. */ - { "[i430LX] Intel Premiere/PCI", "revenge", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_revenge_init, NULL }, + { "[i430LX] Intel Premiere/PCI", "revenge", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_INTEL_430LX, machine_at_revenge_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* Has AMI MegaKey KBC firmware. */ - { "[i430LX] Micro Star 586MC1", "586mc1", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_586mc1_init, NULL }, + { "[i430LX] Micro Star 586MC1", "586mc1", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_INTEL_430LX, machine_at_586mc1_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* This has the Phoenix MultiKey KBC firmware. */ - { "[i430LX] Packard Bell PB520R", "pb520r", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 139264, 2048, 127, machine_at_pb520r_init, at_pb520r_get_device }, + { "[i430LX] Packard Bell PB520R", "pb520r", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_INTEL_430LX, machine_at_pb520r_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 139264, 2048, 127, at_pb520r_get_device }, /* OPTi 596/597 */ /* This uses an AMI KBC firmware in PS/2 mode (it sends command A5 with the PS/2 "Load Security" meaning), most likely MegaKey as it sends command AF (Set Extended Controller RAM) just like the later Intel AMI BIOS'es. */ - { "[OPTi 597] AMI Excalibur VLB", "excalibur", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 60000000, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_VLB | MACHINE_BUS_PS2 | MACHINE_IDE, 2048, 65536, 2048, 127, machine_at_excalibur_init, NULL }, + { "[OPTi 597] AMI Excalibur VLB", "excalibur", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_OPTI_547_597, machine_at_excalibur_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 60000000, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_VLB, MACHINE_IDE, 2048, 65536, 2048, 127, NULL, NULL }, /* OPTi 596/597/822 */ /* This has AMIKey 'F' KBC firmware. */ - { "[OPTi 597] Supermicro P5VL-PCI", "p5vl", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_VLB, 8192, 131072, 8192, 127, machine_at_p5vl_init, NULL }, + { "[OPTi 597] Supermicro P5VL-PCI", "p5vl", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_OPTI_547_597, machine_at_p5vl_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCIV, MACHINE_FLAGS_NONE, 8192, 131072, 8192, 127, NULL, NULL }, /* SiS 50x */ /* This has some form of AMI MegaKey as it uses keyboard controller command 0xCC. */ - { "[SiS 501] AMI Excalibur PCI-II Pentium ISA","excaliburpci2", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_excaliburpci2_init, NULL }, + { "[SiS 501] AMI Excalibur PCI-II Pentium ISA", "excaliburpci2", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_SIS_501, machine_at_excaliburpci2_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[SiS 501] ASUS PCI/I-P5SP4", "p5sp4", MACHINE_TYPE_SOCKET4, CPU_PKG_SOCKET4, 0, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_p5sp4_init, NULL }, + { "[SiS 501] ASUS PCI/I-P5SP4", "p5sp4", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_SIS_501, machine_at_p5sp4_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* Socket 5 machines */ /* 430NX */ /* This has the Phoenix MultiKey KBC firmware. */ - { "[i430NX] Intel Premiere/PCI II", "plato", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3520, 3520, 1.5, 1.5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_plato_init, NULL }, + { "[i430NX] Intel Premiere/PCI II", "plato", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_INTEL_430NX, machine_at_plato_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3520, 3520, 1.5, 1.5, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* This has the Phoenix MultiKey KBC firmware. This is basically an Intel Premiere/PCI II with a fancier POST screen. */ - { "[i430NX] AMBRA DP90 PCI", "ambradp90", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 1.5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_ambradp90_init, NULL }, + { "[i430NX] AMBRA DP90 PCI", "ambradp90", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_INTEL_430NX, machine_at_ambradp90_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 1.5, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* Has AMI MegaKey KBC firmware. */ - { "[i430NX] Gigabyte GA-586IP", "430nx", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, 0, 60000000, 66666667, 3520, 3520, 1.5, 1.5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, machine_at_430nx_init, NULL }, + { "[i430NX] Gigabyte GA-586IP", "430nx", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_INTEL_430NX, machine_at_430nx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 60000000, 66666667, 3520, 3520, 1.5, 1.5, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* 430FX */ /* Uses an ACER/NEC 90M002A (UPD82C42C, 8042 clone) with unknown firmware (V5.0). */ - { "[i430FX] Acer V30", "acerv30", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_acerv30_init, NULL }, + { "[i430FX] Acer V30", "acerv30", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_INTEL_430FX, machine_at_acerv30_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* Has AMIKey F KBC firmware. */ - { "[i430FX] AMI Apollo", "apollo", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_apollo_init, NULL }, + { "[i430FX] AMI Apollo", "apollo", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_INTEL_430FX, machine_at_apollo_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* Has AMIKey H KBC firmware. */ - { "[i430FX] DataExpert EXP8551", "exp8551", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_exp8551_init, NULL }, + { "[i430FX] DataExpert EXP8551", "exp8551", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_INTEL_430FX, machine_at_exp8551_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i430FX] Intel Advanced/ZP", "zappa", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_zappa_init, NULL }, + { "[i430FX] Intel Advanced/ZP", "zappa", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_INTEL_430FX, machine_at_zappa_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* The BIOS sends KBC command B3 which indicates an AMI (or VIA VT82C42N) KBC. */ - { "[i430FX] NEC PowerMate V", "powermatev", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_powermatev_init, NULL }, + { "[i430FX] NEC PowerMate V", "powermatev", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_INTEL_430FX, machine_at_powermatev_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* Has a VIA VT82C42N KBC. */ - { "[i430FX] PC Partner MB500N", "mb500n", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_mb500n_init, NULL }, + { "[i430FX] PC Partner MB500N", "mb500n", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_INTEL_430FX, machine_at_mb500n_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* Has AMIKey Z(!) KBC firmware. */ - { "[i430FX] TriGem Hawk", "hawk", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_hawk_init, NULL }, + { "[i430FX] TriGem Hawk", "hawk", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_INTEL_430FX, machine_at_hawk_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* OPTi 596/597 */ /* This uses an AMI KBC firmware in PS/2 mode (it sends command A5 with the PS/2 "Load Security" meaning), most likely MegaKey as it sends command AF (Set Extended Controller RAM) just like the later Intel AMI BIOS'es. */ - { "[OPTi 597] TMC PAT54PV", "pat54pv", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, CPU_BLOCK(CPU_K5, CPU_5K86), 50000000, 66666667, 3520, 3520, 1.5, 1.5, MACHINE_VLB, 2048, 65536, 2048, 127, machine_at_pat54pv_init, NULL }, + { "[OPTi 597] TMC PAT54PV", "pat54pv", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_OPTI_547_597, machine_at_pat54pv_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK(CPU_K5, CPU_5K86), 50000000, 66666667, 3520, 3520, 1.5, 1.5, MACHINE_VLB, MACHINE_FLAGS_NONE, 2048, 65536, 2048, 127, NULL, NULL }, /* OPTi 596/597/822 */ - { "[OPTi 597] Shuttle HOT-543", "hot543", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3520, 3520, 1.5, 2.0, MACHINE_PCI | MACHINE_VLB, 8192, 131072, 8192, 127, machine_at_hot543_init, NULL }, + { "[OPTi 597] Shuttle HOT-543", "hot543", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_OPTI_547_597, machine_at_hot543_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3520, 3520, 1.5, 2.0, MACHINE_PCIV, MACHINE_FLAGS_NONE, 8192, 131072, 8192, 127, NULL, NULL }, /* SiS 85C50x */ /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[SiS 501] ASUS PCI/I-P54SP4", "p54sp4", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, CPU_BLOCK(CPU_K5, CPU_5K86), 40000000, 66666667, 3380, 3520, 1.5, 1.5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_p54sp4_init, NULL }, + { "[SiS 501] ASUS PCI/I-P54SP4", "p54sp4", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_SIS_501, machine_at_p54sp4_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK(CPU_K5, CPU_5K86), 40000000, 66666667, 3380, 3520, 1.5, 1.5, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[SiS 501] BCM SQ-588", "sq588", MACHINE_TYPE_SOCKET5, CPU_PKG_SOCKET5_7, CPU_BLOCK(CPU_PENTIUMMMX), 50000000, 66666667, 3520, 3520, 1.5, 1.5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_sq588_init, NULL }, + { "[SiS 501] BCM SQ-588", "sq588", MACHINE_TYPE_SOCKET5, MACHINE_CHIPSET_SIS_501, machine_at_sq588_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK(CPU_PENTIUMMMX), 50000000, 66666667, 3520, 3520, 1.5, 1.5, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* Socket 7 (Single Voltage) machines */ /* 430FX */ /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[i430FX] ASUS P/I-P54TP4XE", "p54tp4xe", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3600, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_p54tp4xe_init, NULL }, + { "[i430FX] ASUS P/I-P54TP4XE", "p54tp4xe", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_p54tp4xe_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3600, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[i430FX] ASUS P/I-P54TP4XE (MR BIOS)", "p54tp4xe_mr", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3600, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_p54tp4xe_mr_init, NULL }, + { "[i430FX] ASUS P/I-P54TP4XE (MR BIOS)", "p54tp4xe_mr", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_p54tp4xe_mr_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3600, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i430FX] Gateway 2000 Thor", "gw2katx", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_gw2katx_init, NULL }, + { "[i430FX] Gateway 2000 Thor", "gw2katx", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_gw2katx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* The BIOS does not send a single non-standard KBC command, but the board has a SMC Super I/O chip with on-chip KBC and AMI MegaKey KBC firmware. */ - { "[i430FX] HP Vectra VL 5 Series 4", "vectra54", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 511, machine_at_vectra54_init, at_vectra54_get_device }, + { "[i430FX] HP Vectra VL 5 Series 4", "vectra54", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_vectra54_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 511, at_vectra54_get_device }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i430FX] Intel Advanced/ATX", "thor", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, machine_at_thor_init, at_thor_get_device }, + { "[i430FX] Intel Advanced/ATX", "thor", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_thor_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_thor_get_device }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i430FX] Intel Advanced/ATX (MR BIOS)", "mrthor", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_mrthor_init, at_mrthor_get_device }, + { "[i430FX] Intel Advanced/ATX (MR BIOS)", "mrthor", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_mrthor_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, at_mrthor_get_device }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i430FX] Intel Advanced/EV", "endeavor", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, machine_at_endeavor_init, at_endeavor_get_device }, + { "[i430FX] Intel Advanced/EV", "endeavor", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_endeavor_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_endeavor_get_device }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[i430FX] MSI MS-5119", "ms5119", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_ms5119_init, NULL }, + { "[i430FX] MSI MS-5119", "ms5119", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_ms5119_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* This most likely uses AMI MegaKey KBC firmware as well due to having the same Super I/O chip (that has the KBC firmware on it) as eg. the Advanced/EV. */ - { "[i430FX] Packard Bell PB640", "pb640", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, machine_at_pb640_init, at_pb640_get_device }, + { "[i430FX] Packard Bell PB640", "pb640", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_pb640_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_pb640_get_device }, /* Has an AMI 'H' KBC firmware (1992). */ - { "[i430FX] QDI FMB", "fmb", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, CPU_BLOCK(CPU_WINCHIP, CPU_WINCHIP2, CPU_Cx6x86, CPU_Cx6x86L, CPU_Cx6x86MX), 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_fmb_init, NULL }, + { "[i430FX] QDI FMB", "fmb", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_fmb_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_QDI_FMB, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* 430HX */ /* I can't determine what KBC firmware this has, but given that the Acer V35N and V60 have Phoenix MultiKey KBC firmware on the chip, I'm going to assume so does the M3A. */ - { "[i430HX] Acer M3A", "acerm3a", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3300, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 196608, 8192, 127, machine_at_acerm3a_init, NULL }, + { "[i430HX] Acer M3A", "acerm3a", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430HX, machine_at_acerm3a_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3300, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 196608, 8192, 127, NULL, NULL }, /* Has AMIKey F KBC firmware. */ - { "[i430HX] AOpen AP53", "ap53", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3450, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, machine_at_ap53_init, NULL }, + { "[i430HX] AOpen AP53", "ap53", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430HX, machine_at_ap53_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3450, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, NULL, NULL }, /* [TEST] Has a VIA 82C42N KBC, with AMIKey F KBC firmware. */ - { "[i430HX] Biostar MB-8500TUC", "8500tuc", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, machine_at_8500tuc_init, NULL }, + { "[i430HX] Biostar MB-8500TUC", "8500tuc", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430HX, machine_at_8500tuc_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, NULL, NULL }, /* [TEST] Unable to determine what KBC this has. A list on a Danish site shows the BIOS as having a -0 string, indicating non-AMI KBC firmware. */ - { "[i430HX] Supermicro P55T2S", "p55t2s", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3300, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 127, machine_at_p55t2s_init, NULL }, + { "[i430HX] Supermicro P55T2S", "p55t2s", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430HX, machine_at_p55t2s_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3300, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 786432, 8192, 127, NULL, NULL }, /* 430VX */ /* Has AMIKey H KBC firmware (AMIKey-2). */ - { "[i430VX] ECS P5VX-B", "p5vxb", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_p5vxb_init, NULL }, + { "[i430VX] ECS P5VX-B", "p5vxb", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430VX, machine_at_p5vxb_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i430VX] Gateway 2000 Tigereye", "gw2kte", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_gw2kte_init, NULL }, + { "[i430VX] Gateway 2000 Tigereye", "gw2kte", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430VX, machine_at_gw2kte_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* SiS 5511 */ /* Has AMIKey H KBC firmware (AMIKey-2). */ - { "[SiS 5511] AOpen AP5S", "ap5s", MACHINE_TYPE_SOCKET7_3V, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, machine_at_ap5s_init, NULL }, + { "[SiS 5511] AOpen AP5S", "ap5s", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_SIS_5511, machine_at_ap5s_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, NULL, NULL }, /* Socket 7 (Dual Voltage) machines */ /* 430HX */ /* Has SST flash and the SMC FDC73C935's on-chip KBC with Phoenix MultiKey firmware. */ - { "[i430HX] Acer V35N", "acerv35n", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, CPU_BLOCK(CPU_Cx6x86MX), 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 196608, 8192, 127, machine_at_acerv35n_init, NULL }, + { "[i430HX] Acer V35N", "acerv35n", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430HX, machine_at_acerv35n_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK(CPU_Cx6x86MX), 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 196608, 8192, 127, NULL, NULL }, /* Has AMIKey H KBC firmware (AMIKey-2). */ - { "[i430HX] ASUS P/I-P55T2P4", "p55t2p4", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 83333333, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 262144, 8192, 127, machine_at_p55t2p4_init, NULL }, + { "[i430HX] ASUS P/I-P55T2P4", "p55t2p4", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430HX, machine_at_p55t2p4_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 83333333, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 127, NULL, NULL }, /* Has the SMC FDC73C935's on-chip KBC with Phoenix MultiKey firmware. */ - { "[i430HX] Micronics M7S-Hi", "m7shi", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 511, machine_at_m7shi_init, NULL }, + { "[i430HX] Micronics M7S-Hi", "m7shi", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430HX, machine_at_m7shi_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 511, NULL, NULL }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i430HX] Intel TC430HX", "tc430hx", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 255, machine_at_tc430hx_init, NULL }, + { "[i430HX] Intel TC430HX", "tc430hx", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430HX, machine_at_tc430hx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 255, NULL, NULL }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i430HX] Toshiba Equium 5200D", "equium5200", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 196608, 8192, 127, machine_at_equium5200_init, NULL }, + { "[i430HX] Toshiba Equium 5200D", "equium5200", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430HX, machine_at_equium5200_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 196608, 8192, 127, NULL, NULL }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . Yes, this is an Intel AMI BIOS with a fancy splash screen. */ - { "[i430HX] Sony Vaio PCV-90", "pcv90", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 196608, 8192, 127, machine_at_pcv90_init, NULL }, + { "[i430HX] Sony Vaio PCV-90", "pcv90", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430HX, machine_at_pcv90_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 196608, 8192, 127, NULL, NULL }, /* The base board has AMIKey-2 (updated 'H') KBC firmware. */ - { "[i430HX] ASUS P/I-P65UP5 (C-P55T2D)", "p65up5_cp55t2d", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, machine_at_p65up5_cp55t2d_init, NULL }, + { "[i430HX] ASUS P/I-P65UP5 (C-P55T2D)", "p65up5_cp55t2d", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430HX, machine_at_p65up5_cp55t2d_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, NULL, NULL }, /* 430VX */ /* This has the VIA VT82C42N KBC. */ - { "[i430VX] AOpen AP5VM", "ap5vm", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2600, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_SCSI, 8192, 131072, 8192, 127, machine_at_ap5vm_init, NULL }, + { "[i430VX] AOpen AP5VM", "ap5vm", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_ap5vm_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2600, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_SCSI, 8192, 131072, 8192, 127, NULL, NULL }, /* Has AMIKey H KBC firmware (AMIKey-2). */ - { "[i430VX] ASUS P/I-P55TVP4", "p55tvp4", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_p55tvp4_init, NULL }, + { "[i430VX] ASUS P/I-P55TVP4", "p55tvp4", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_p55tvp4_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* The BIOS does not send a single non-standard KBC command, so it must have a standard IBM PS/2 KBC firmware or a clone thereof. */ - { "[i430VX] Azza PT-5IV", "5ivg", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_5ivg_init, NULL }, + { "[i430VX] Azza PT-5IV", "5ivg", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_5ivg_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* [TEST] Has AMIKey 'F' KBC firmware. */ - { "[i430VX] Biostar MB-8500TVX-A", "8500tvxa", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2600, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_8500tvxa_init, NULL }, + { "[i430VX] Biostar MB-8500TVX-A", "8500tvxa", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_8500tvxa_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2600, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* The BIOS does not send a single non-standard KBC command, but the board has a SMC Super I/O chip with on-chip KBC and AMI MegaKey KBC firmware. */ - { "[i430VX] Compaq Presario 2240", "presario2240", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, machine_at_presario2240_init, at_presario2240_get_device }, + { "[i430VX] Compaq Presario 2240", "presario2240", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_presario2240_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_presario2240_get_device }, /* This most likely has AMI MegaKey as above. */ - { "[i430VX] Compaq Presario 4500", "presario4500", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, machine_at_presario4500_init, at_presario4500_get_device }, + { "[i430VX] Compaq Presario 4500", "presario4500", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_presario4500_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_presario4500_get_device }, /* The BIOS sends KBC command CB which is an AMI KBC command, so it has an AMI KBC firmware. */ - { "[i430VX] Epox P55-VA", "p55va", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_p55va_init, NULL }, + { "[i430VX] Epox P55-VA", "p55va", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_p55va_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* The BIOS does not send a single non-standard KBC command. */ - { "[i430VX] HP Brio 80xx", "brio80xx", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 66666667, 66666667, 2200, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_brio80xx_init, NULL }, + { "[i430VX] HP Brio 80xx", "brio80xx", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_brio80xx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 66666667, 66666667, 2200, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i430VX] Packard Bell PB680", "pb680", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_pb680_init, NULL }, + { "[i430VX] Packard Bell PB680", "pb680", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_pb680_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* This has the AMIKey 'H' firmware, possibly AMIKey-2. Photos show it with a BestKey, so it likely clones the behavior of AMIKey 'H'. */ - { "[i430VX] PC Partner MB520N", "mb520n", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2600, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_mb520n_init, NULL }, + { "[i430VX] PC Partner MB520N", "mb520n", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_mb520n_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2600, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* This has a Holtek KBC and the BIOS does not send a single non-standard KBC command, so it must be an ASIC that clones the standard IBM PS/2 KBC. */ - { "[i430VX] Shuttle HOT-557", "430vx", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_GAMEPORT, 8192, 131072, 8192, 127, machine_at_i430vx_init, NULL }, + { "[i430VX] Shuttle HOT-557", "430vx", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_i430vx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_GAMEPORT, 8192, 131072, 8192, 127, NULL, NULL }, /* 430TX */ /* The BIOS sends KBC command B8, CA, and CB, so it has an AMI KBC firmware. */ - { "[i430TX] ADLink NuPRO-592", "nupro592", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 66666667, 66666667, 1900, 2800, 1.5, 5.5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, machine_at_nupro592_init, NULL }, + { "[i430TX] ADLink NuPRO-592", "nupro592", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_nupro592_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 66666667, 66666667, 1900, 2800, 1.5, 5.5, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL }, /* This has the AMIKey KBC firmware, which is an updated 'F' type (YM430TX is based on the TX97). */ - { "[i430TX] ASUS TX97", "tx97", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 75000000, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, machine_at_tx97_init, NULL }, + { "[i430TX] ASUS TX97", "tx97", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_tx97_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 75000000, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL }, #if defined(DEV_BRANCH) && defined(NO_SIO) /* This has the Phoenix MultiKey KBC firmware. */ - { "[i430TX] Intel AN430TX", "an430tx", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 60000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, machine_at_an430tx_init, NULL }, + { "[i430TX] Intel AN430TX", "an430tx", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_an430tx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 60000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL }, #endif /* This has the AMIKey KBC firmware, which is an updated 'F' type. */ - { "[i430TX] Intel YM430TX", "ym430tx", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 60000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, machine_at_ym430tx_init, NULL }, + { "[i430TX] Intel YM430TX", "ym430tx", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_ym430tx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 60000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL }, /* The BIOS sends KBC command BB and expects it to output a byte, which is AMI KBC behavior. */ - { "[i430TX] PC Partner MB540N", "mb540n", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 60000000, 66666667, 2700, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, machine_at_mb540n_init, NULL }, + { "[i430TX] PC Partner MB540N", "mb540n", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_mb540n_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 60000000, 66666667, 2700, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL }, /* [TEST] Has AMIKey 'H' KBC firmware. */ - { "[i430TX] Supermicro P5MMS98", "p5mms98", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 66666667, 2100, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, machine_at_p5mms98_init, NULL }, + { "[i430TX] Supermicro P5MMS98", "p5mms98", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_p5mms98_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2100, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL }, /* Apollo VPX */ /* Has the VIA VT82C586B southbridge with on-chip KBC identical to the VIA VT82C42N. */ - { "[VIA VPX] FIC VA-502", "ficva502", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 75000000, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, machine_at_ficva502_init, NULL }, + { "[VIA VPX] FIC VA-502", "ficva502", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_VIA_APOLLO_VPX, machine_at_ficva502_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 75000000, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, NULL, NULL }, /* Apollo VP3 */ /* Has the VIA VT82C586B southbridge with on-chip KBC identical to the VIA VT82C42N. */ - { "[VIA VP3] FIC PA-2012", "ficpa2012", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 55000000, 75000000, 2100, 3520, 1.5, 5.5, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 127, machine_at_ficpa2012_init, NULL }, + { "[VIA VP3] FIC PA-2012", "ficpa2012", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_VIA_APOLLO_VP3, machine_at_ficpa2012_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 55000000, 75000000, 2100, 3520, 1.5, 5.5, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 127, NULL, NULL }, /* SiS 5571 */ /* Has the SiS 5571 chipset with on-chip KBC. */ - { "[SiS 5571] Rise R534F", "r534f", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 55000000, 83333333, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 393216, 8192, 127, machine_at_r534f_init, NULL }, + { "[SiS 5571] Rise R534F", "r534f", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_SIS_5571, machine_at_r534f_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 55000000, 83333333, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 393216, 8192, 127, NULL, NULL }, /* Has the SiS 5571 chipset with on-chip KBC. */ - { "[SiS 5571] MSI MS-5146", "ms5146", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 75000000, 2800, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 262144, 8192, 127, machine_at_ms5146_init, NULL }, + { "[SiS 5571] MSI MS-5146", "ms5146", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_SIS_5571, machine_at_ms5146_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 75000000, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 127, NULL, NULL }, /* ALi ALADDiN IV+ */ /* Has the ALi M1543 southbridge with on-chip KBC. */ - { "[ALi ALADDiN IV+] PC Chips M560", "m560", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 50000000, 83333333, 2500, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_m560_init, NULL }, + { "[ALi ALADDiN IV+] PC Chips M560", "m560", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_ALI_ALADDIN_IV_PLUS, machine_at_m560_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 83333333, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, NULL, NULL }, /* Has the ALi M1543 southbridge with on-chip KBC. */ - { "[ALi ALADDiN IV+] MSI MS-5164", "ms5164", MACHINE_TYPE_SOCKET7, CPU_PKG_SOCKET5_7, 0, 60000000, 83333333, 2100, 3520, 1.5, 3.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_ms5164_init, NULL }, + { "[ALi ALADDiN IV+] MSI MS-5164", "ms5164", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_ALI_ALADDIN_IV_PLUS, machine_at_ms5164_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 60000000, 83333333, 2100, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 255, NULL, NULL }, /* Super Socket 7 machines */ /* ALi ALADDiN V */ /* Has the ALi M1543C southbridge with on-chip KBC. */ - { "[ALi ALADDiN V] ASUS P5A", "p5a", MACHINE_TYPE_SOCKETS7, CPU_PKG_SOCKET5_7, 0, 60000000, 120000000, 2000, 3520, 1.5, 5.5, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024,1572864, 8192, 255, machine_at_p5a_init, NULL }, + { "[ALi ALADDiN V] ASUS P5A", "p5a", MACHINE_TYPE_SOCKETS7, MACHINE_CHIPSET_ALI_ALADDIN_V, machine_at_p5a_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 60000000, 120000000, 2000, 3520, 1.5, 5.5, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 1024, 1572864, 8192, 255, NULL, NULL }, /* Is the exact same as the Matsonic MS6260S. Has the ALi M1543C southbridge with on-chip KBC. */ - { "[ALi ALADDiN V] PC Chips M579", "m579", MACHINE_TYPE_SOCKETS7, CPU_PKG_SOCKET5_7, 0, 66666667, 100000000, 2000, 3520, 1.5, 5.5, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024,1572864, 8192, 255, machine_at_m579_init, NULL }, + { "[ALi ALADDiN V] PC Chips M579", "m579", MACHINE_TYPE_SOCKETS7, MACHINE_CHIPSET_ALI_ALADDIN_V, machine_at_m579_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 66666667, 100000000, 2000, 3520, 1.5, 5.5, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 1024, 1572864, 8192, 255, NULL, NULL }, /* Has the ALi M1543C southbridge with on-chip KBC. */ - { "[ALi ALADDiN V] Gigabyte GA-5AA", "5aa", MACHINE_TYPE_SOCKETS7, CPU_PKG_SOCKET5_7, 0, 66666667, 140000000, 1300, 3520, 1.5, 5.5, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024,1572864, 8192, 255, machine_at_5aa_init, NULL }, + { "[ALi ALADDiN V] Gigabyte GA-5AA", "5aa", MACHINE_TYPE_SOCKETS7, MACHINE_CHIPSET_ALI_ALADDIN_V, machine_at_5aa_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 66666667, 140000000, 1300, 3520, 1.5, 5.5, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 1024, 1572864, 8192, 255, NULL, NULL }, /* Has the ALi M1543C southbridge with on-chip KBC. */ - { "[ALi ALADDiN V] Gigabyte GA-5AX", "5ax", MACHINE_TYPE_SOCKETS7, CPU_PKG_SOCKET5_7, 0, 66666667, 140000000, 1300, 3520, 1.5, 5.5, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024,1572864, 8192, 255, machine_at_5ax_init, NULL }, + { "[ALi ALADDiN V] Gigabyte GA-5AX", "5ax", MACHINE_TYPE_SOCKETS7, MACHINE_CHIPSET_ALI_ALADDIN_V, machine_at_5ax_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 66666667, 140000000, 1300, 3520, 1.5, 5.5, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 1024, 1572864, 8192, 255, NULL, NULL }, /* Apollo MVP3 */ /* Has the VIA VT82C586B southbridge with on-chip KBC identical to the VIA VT82C42N. */ - { "[VIA MVP3] AOpen AX59 Pro", "ax59pro", MACHINE_TYPE_SOCKETS7, CPU_PKG_SOCKET5_7, 0, 66666667, 124242424, 1300, 3520, 1.5, 5.5, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_ax59pro_init, NULL }, + { "[VIA MVP3] AOpen AX59 Pro", "ax59pro", MACHINE_TYPE_SOCKETS7, MACHINE_CHIPSET_VIA_APOLLO_MVP3, machine_at_ax59pro_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 66666667, 124242424, 1300, 3520, 1.5, 5.5, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 255, NULL, NULL }, /* Has the VIA VT82C586B southbridge with on-chip KBC identical to the VIA VT82C42N. */ - { "[VIA MVP3] FIC VA-503+", "ficva503p", MACHINE_TYPE_SOCKETS7, CPU_PKG_SOCKET5_7, 0, 66666667, 124242424, 2000, 3200, 1.5, 5.5, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_mvp3_init, NULL }, + { "[VIA MVP3] FIC VA-503+", "ficva503p", MACHINE_TYPE_SOCKETS7, MACHINE_CHIPSET_VIA_APOLLO_MVP3, machine_at_mvp3_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 66666667, 124242424, 2000, 3200, 1.5, 5.5, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 255, NULL, NULL }, /* Has the VIA VT82C686A southbridge with on-chip KBC identical to the VIA VT82C42N. */ - { "[VIA MVP3] FIC VA-503A", "ficva503a", MACHINE_TYPE_SOCKETS7, CPU_PKG_SOCKET5_7, 0, 66666667, 124242424, 1800, 3100, 1.5, 5.5, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_BUS_AC97 | MACHINE_IDE_DUAL | MACHINE_SOUND, 8192, 786432, 8192, 255, machine_at_ficva503a_init, NULL }, + { "[VIA MVP3] FIC VA-503A", "ficva503a", MACHINE_TYPE_SOCKETS7, MACHINE_CHIPSET_VIA_APOLLO_MVP3, machine_at_ficva503a_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 66666667, 124242424, 1800, 3100, 1.5, 5.5, MACHINE_PS2_A97, MACHINE_IDE_DUAL | MACHINE_SOUND, 8192, 786432, 8192, 255, NULL, NULL }, /* Has the VIA VT82C686A southbridge with on-chip KBC identical to the VIA VT82C42N. */ - { "[VIA MVP3] Soyo 5EMA PRO", "5emapro", MACHINE_TYPE_SOCKETS7, CPU_PKG_SOCKET5_7, 0, 66666667, 124242424, 2000, 3520, 1.5, 5.5, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_5emapro_init, NULL }, + { "[VIA MVP3] Soyo 5EMA PRO", "5emapro", MACHINE_TYPE_SOCKETS7, MACHINE_CHIPSET_VIA_APOLLO_MVP3, machine_at_5emapro_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 66666667, 124242424, 2000, 3520, 1.5, 5.5, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, NULL, NULL }, /* Socket 8 machines */ /* 450KX */ /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[i450KX] ASUS P/I-P6RP4", "p6rp4", MACHINE_TYPE_SOCKET8, CPU_PKG_SOCKET8, 0, 60000000, 66666667, 2100, 3500, 1.5, 8.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, machine_at_p6rp4_init, NULL }, + { "[i450KX] ASUS P/I-P6RP4", "p6rp4", MACHINE_TYPE_SOCKET8, MACHINE_CHIPSET_INTEL_450KX, machine_at_p6rp4_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET8, CPU_BLOCK_NONE, 60000000, 66666667, 2100, 3500, 1.5, 8.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, NULL, NULL }, /* 440FX */ /* Has the SMC FDC73C935's on-chip KBC with Phoenix MultiKey firmware. */ - { "[i440FX] Acer V60N", "acerv60n", MACHINE_TYPE_SOCKET8, CPU_PKG_SOCKET8, 0, 60000000, 66666667, 2500, 3500, 1.5, 8.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, machine_at_acerv60n_init, NULL }, + { "[i440FX] Acer V60N", "acerv60n", MACHINE_TYPE_SOCKET8, MACHINE_CHIPSET_INTEL_440FX, machine_at_acerv60n_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET8, CPU_BLOCK_NONE, 60000000, 66666667, 2500, 3500, 1.5, 8.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, NULL, NULL }, /* The base board has AMIKey-2 (updated 'H') KBC firmware. */ - { "[i440FX] ASUS P/I-P65UP5 (C-P6ND)", "p65up5_cp6nd", MACHINE_TYPE_SOCKET8, CPU_PKG_SOCKET8, 0, 60000000, 66666667, 2100, 3500, 1.5, 8.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 127, machine_at_p65up5_cp6nd_init, NULL }, + { "[i440FX] ASUS P/I-P65UP5 (C-P6ND)", "p65up5_cp6nd", MACHINE_TYPE_SOCKET8, MACHINE_CHIPSET_INTEL_440FX, machine_at_p65up5_cp6nd_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET8, CPU_BLOCK_NONE, 60000000, 66666667, 2100, 3500, 1.5, 8.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 127, NULL, NULL }, /* The MB-8600TTX has an AMIKey 'F' KBC firmware, so I'm going to assume so does the MB-8600TTC until someone can actually identify it. */ - { "[i440FX] Biostar MB-8600TTC", "8600ttc", MACHINE_TYPE_SOCKET8, CPU_PKG_SOCKET8, 0, 50000000, 66666667, 2900, 3300, 2.0, 5.5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 127, machine_at_8600ttc_init, NULL }, - { "[i440FX] Gigabyte GA-686NX", "686nx", MACHINE_TYPE_SOCKET8, CPU_PKG_SOCKET8, 0, 60000000, 66666667, 2100, 3500, 2.0, 5.5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, machine_at_686nx_init, NULL }, + { "[i440FX] Biostar MB-8600TTC", "8600ttc", MACHINE_TYPE_SOCKET8, MACHINE_CHIPSET_INTEL_440FX, machine_at_8600ttc_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET8, CPU_BLOCK_NONE, 50000000, 66666667, 2900, 3300, 2.0, 5.5, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 127, NULL, NULL }, + { "[i440FX] Gigabyte GA-686NX", "686nx", MACHINE_TYPE_SOCKET8, MACHINE_CHIPSET_INTEL_440FX, machine_at_686nx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET8, CPU_BLOCK_NONE, 60000000, 66666667, 2100, 3500, 2.0, 5.5, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, NULL, NULL }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i440FX] Intel AP440FX", "ap440fx", MACHINE_TYPE_SOCKET8, CPU_PKG_SOCKET8, 0, 60000000, 66666667, 2100, 3500, 2.0, 3.5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, machine_at_ap440fx_init, NULL }, + { "[i440FX] Intel AP440FX", "ap440fx", MACHINE_TYPE_SOCKET8, MACHINE_CHIPSET_INTEL_440FX, machine_at_ap440fx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET8, CPU_BLOCK_NONE, 60000000, 66666667, 2100, 3500, 2.0, 3.5, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i440FX] Intel VS440FX", "vs440fx", MACHINE_TYPE_SOCKET8, CPU_PKG_SOCKET8, 0, 60000000, 66666667, 2100, 3500, 2.0, 3.5, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, machine_at_vs440fx_init, NULL }, + { "[i440FX] Intel VS440FX", "vs440fx", MACHINE_TYPE_SOCKET8, MACHINE_CHIPSET_INTEL_440FX, machine_at_vs440fx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET8, CPU_BLOCK_NONE, 60000000, 66666667, 2100, 3500, 2.0, 3.5, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, NULL, NULL }, /* Has the SMC FDC73C935's on-chip KBC with Phoenix MultiKey firmware. */ - { "[i440FX] Micronics M6Mi", "m6mi", MACHINE_TYPE_SOCKET8, CPU_PKG_SOCKET8, 0, 60000000, 66666667, 2900, 3300, 1.5, 8.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 127, machine_at_m6mi_init, NULL }, + { "[i440FX] Micronics M6Mi", "m6mi", MACHINE_TYPE_SOCKET8, MACHINE_CHIPSET_INTEL_440FX, machine_at_m6mi_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET8, CPU_BLOCK_NONE, 60000000, 66666667, 2900, 3300, 1.5, 8.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 786432, 8192, 127, NULL, NULL }, /* I found a BIOS string of it that ends in -S, but it could be a typo for -5 (there's quite a few AMI BIOS strings around with typo'd KBC codes), so I'm going to give it an AMI MegaKey. */ - { "[i440FX] PC Partner MB600N", "mb600n", MACHINE_TYPE_SOCKET8, CPU_PKG_SOCKET8, 0, 60000000, 66666667, 2100, 3500, 1.5, 8.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, machine_at_mb600n_init, NULL }, + { "[i440FX] PC Partner MB600N", "mb600n", MACHINE_TYPE_SOCKET8, MACHINE_CHIPSET_INTEL_440FX, machine_at_mb600n_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET8, CPU_BLOCK_NONE, 60000000, 66666667, 2100, 3500, 1.5, 8.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 524288, 8192, 127, NULL, NULL }, /* Slot 1 machines */ /* ALi ALADDiN V */ /* Has the ALi M1543C southbridge with on-chip KBC. */ - { "[ALi ALADDiN-PRO II] PC Chips M729", "m729", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 1024,1572864, 8192, 255, machine_at_m729_init, NULL }, + { "[ALi ALADDiN-PRO II] PC Chips M729", "m729", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_ALI_ALADDIN_PRO_II, machine_at_m729_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 1024, 1572864, 8192, 255, NULL, NULL }, /* 440FX */ /* The base board has AMIKey-2 (updated 'H') KBC firmware. */ - { "[i440FX] ASUS P/I-P65UP5 (C-PKND)", "p65up5_cpknd", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 50000000, 66666667, 1800, 3500, 1.5, 8.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 127, machine_at_p65up5_cpknd_init, NULL }, + { "[i440FX] ASUS P/I-P65UP5 (C-PKND)", "p65up5_cpknd", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440FX, machine_at_p65up5_cpknd_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 50000000, 66666667, 1800, 3500, 1.5, 8.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 127, NULL, NULL }, /* This has a Holtek KBC and the BIOS does not send a single non-standard KBC command, so it must be an ASIC that clones the standard IBM PS/2 KBC. */ - { "[i440FX] ASUS KN97", "kn97", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 60000000, 83333333, 1800, 3500, 1.5, 8.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 127, machine_at_kn97_init, NULL }, + { "[i440FX] ASUS KN97", "kn97", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440FX, machine_at_kn97_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 60000000, 83333333, 1800, 3500, 1.5, 8.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 786432, 8192, 127, NULL, NULL }, /* 440LX */ /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440LX] ABIT LX6", "lx6", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 60000000, 100000000, 1500, 3500, 2.0, 5.5, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_lx6_init, NULL }, + { "[i440LX] ABIT LX6", "lx6", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440LX, machine_at_lx6_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 60000000, 100000000, 1500, 3500, 2.0, 5.5, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 255, NULL, NULL }, /* Has a SM(S)C FDC37C935 Super I/O chip with on-chip KBC with Phoenix MultiKey KBC firmware. */ - { "[i440LX] Micronics Spitfire", "spitfire", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 66666667, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_spitfire_init, NULL }, + { "[i440LX] Micronics Spitfire", "spitfire", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440LX, machine_at_spitfire_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 66666667, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 255, NULL, NULL }, /* 440EX */ /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440EX] QDI EXCELLENT II", "p6i440e2", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 83333333, 1800, 3500, 3.0, 8.0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 255, machine_at_p6i440e2_init, NULL }, + { "[i440EX] QDI EXCELLENT II", "p6i440e2", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440EX, machine_at_p6i440e2_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 83333333, 1800, 3500, 3.0, 8.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 524288, 8192, 255, NULL, NULL }, /* 440BX */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440BX] ASUS P2B-LS", "p2bls", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 50000000, 112121212, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_p2bls_init, NULL }, + { "[i440BX] ASUS P2B-LS", "p2bls", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440BX, machine_at_p2bls_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 50000000, 112121212, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 255, NULL, NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440BX] ASUS P3B-F", "p3bf", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_p3bf_init, NULL }, + { "[i440BX] ASUS P3B-F", "p3bf", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440BX, machine_at_p3bf_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 255, NULL, NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440BX] ABIT BF6", "bf6", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 133333333, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_bf6_init, NULL }, + { "[i440BX] ABIT BF6", "bf6", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440BX, machine_at_bf6_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 133333333, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, NULL, NULL }, /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440BX] AOpen AX6BC", "ax6bc", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 112121212, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_ax6bc_init, NULL }, + { "[i440BX] AOpen AX6BC", "ax6bc", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440BX, machine_at_ax6bc_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 112121212, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, NULL, NULL }, /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440BX] Gigabyte GA-686BX", "686bx", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_686bx_init, NULL }, + { "[i440BX] Gigabyte GA-686BX", "686bx", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440BX, machine_at_686bx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, NULL, NULL }, /* Has a SM(S)C FDC37M60x Super I/O chip with on-chip KBC with most likely AMIKey-2 KBC firmware. */ - { "[i440BX] HP Vectra VEi 8", "vei8", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_vei8_init, NULL }, + { "[i440BX] HP Vectra VEi 8", "vei8", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440BX, machine_at_vei8_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, NULL, NULL }, /* Has a National Semiconductors PC87309 Super I/O chip with on-chip KBC with most likely AMIKey-2 KBC firmware. */ - { "[i440BX] Tyan Tsunami ATX", "s1846", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 112121212, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_SOUND, 8192,1048576, 8192, 255, machine_at_s1846_init, at_s1846_get_device }, + { "[i440BX] Tyan Tsunami ATX", "s1846", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440BX, machine_at_s1846_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 112121212, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL | MACHINE_SOUND, 8192,1048576, 8192, 255, at_s1846_get_device }, /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440BX] Supermicro P6SBA", "p6sba", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_p6sba_init, NULL }, + { "[i440BX] Supermicro P6SBA", "p6sba", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440BX, machine_at_p6sba_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, NULL, NULL }, /* 440ZX */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440ZX] MSI MS-6168", "ms6168", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND,8192, 524288, 8192, 255, machine_at_ms6168_init, at_ms6168_get_device }, + { "[i440ZX] MSI MS-6168", "ms6168", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440ZX, machine_at_ms6168_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL | MACHINE_AV, 8192, 524288, 8192, 255, at_ms6168_get_device }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440ZX] Packard Bell Bora Pro", "borapro", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 66666667, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND,8192, 524288, 8192, 255, machine_at_borapro_init, at_borapro_get_device }, + { "[i440ZX] Packard Bell Bora Pro", "borapro", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440ZX, machine_at_borapro_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 66666667, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL | MACHINE_AV, 8192, 524288, 8192, 255, at_borapro_get_device }, /* SMSC VictoryBX-66 */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[SMSC VictoryBX-66] A-Trend ATC6310BXII","atc6310bxii", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_atc6310bxii_init, NULL }, + { "[SMSC VictoryBX-66] A-Trend ATC6310BXII", "atc6310bxii", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_SMSC_VICTORYBX_66, machine_at_atc6310bxii_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, NULL, NULL }, /* VIA Apollo Pro */ /* Has the VIA VT82C596B southbridge with on-chip KBC identical to the VIA VT82C42N. */ - { "[VIA Apollo Pro] FIC KA-6130", "ficka6130", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 255, machine_at_ficka6130_init, NULL }, + { "[VIA Apollo Pro] FIC KA-6130", "ficka6130", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_VIA_APOLLO_PRO, machine_at_ficka6130_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 524288, 8192, 255, NULL, NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[VIA Apollo Pro 133] ASUS P3V133", "p3v133", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1572864, 8192, 255, machine_at_p3v133_init, NULL }, + { "[VIA Apollo Pro 133] ASUS P3V133", "p3v133", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_VIA_APOLLO_PRO_133, machine_at_p3v133_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 1572864, 8192, 255, NULL, NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[VIA Apollo Pro 133A] ASUS P3V4X", "p3v4x", MACHINE_TYPE_SLOT1, CPU_PKG_SLOT1, 0, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,2097152, 8192, 255, machine_at_p3v4x_init, NULL }, + { "[VIA Apollo Pro 133A] ASUS P3V4X", "p3v4x", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, machine_at_p3v4x_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 2097152, 8192, 255, NULL, NULL }, /* Slot 1/2 machines */ /* 440GX */ /* Has a National Semiconductors PC87309 Super I/O chip with on-chip KBC with most likely AMIKey-2 KBC firmware. */ - { "[i440GX] Freeway FW-6400GX", "fw6400gx", MACHINE_TYPE_SLOT1_2, CPU_PKG_SLOT1 | CPU_PKG_SLOT2, 0, 100000000, 150000000, 1800, 3500, 3.0, 8.0, (MACHINE_AGP & ~MACHINE_AT) | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 16384,2080768,16384, 511, machine_at_fw6400gx_init, NULL }, + { "[i440GX] Freeway FW-6400GX", "fw6400gx", MACHINE_TYPE_SLOT1_2, MACHINE_CHIPSET_INTEL_440GX, machine_at_fw6400gx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1 | CPU_PKG_SLOT2, CPU_BLOCK_NONE, 100000000, 150000000, 1800, 3500, 3.0, 8.0, MACHINE_PS2_NOISA, MACHINE_IDE_DUAL, 16384, 2080768, 16384, 511, NULL, NULL }, /* Slot 1/Socket 370 machines */ /* 440BX */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440BX] Tyan Trinity 371", "s1857", MACHINE_TYPE_SLOT1_370, CPU_PKG_SLOT1 | CPU_PKG_SOCKET370, 0, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_s1857_init, at_s1857_get_device }, + { "[i440BX] Tyan Trinity 371", "s1857", MACHINE_TYPE_SLOT1_370, MACHINE_CHIPSET_INTEL_440BX, machine_at_s1857_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1 | CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, at_s1857_get_device }, /* Slot 2 machines */ /* 440GX */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440GX] Gigabyte GA-6GXU", "6gxu", MACHINE_TYPE_SLOT2, CPU_PKG_SLOT2, 0, 100000000, 133333333, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 16384,2097152,16384, 511, machine_at_6gxu_init, NULL }, + { "[i440GX] Gigabyte GA-6GXU", "6gxu", MACHINE_TYPE_SLOT2, MACHINE_CHIPSET_INTEL_440GX, machine_at_6gxu_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT2, CPU_BLOCK_NONE, 100000000, 133333333, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 16384,2097152,16384, 511, NULL, NULL }, /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440GX] Supermicro S2DGE", "s2dge", MACHINE_TYPE_SLOT2, CPU_PKG_SLOT2, 0, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 16384,2097152,16384, 511, machine_at_s2dge_init, NULL }, + { "[i440GX] Supermicro S2DGE", "s2dge", MACHINE_TYPE_SLOT2, MACHINE_CHIPSET_INTEL_440GX, machine_at_s2dge_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT2, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 16384,2097152,16384, 511, NULL, NULL }, /* PGA370 machines */ /* 440LX */ /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440LX] Supermicro 370SLM", "s370slm", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 100000000, 1800, 3500, MACHINE_MULTIPLIER_FIXED, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_s370slm_init, NULL }, + { "[i440LX] Supermicro 370SLM", "s370slm", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_INTEL_440LX, machine_at_s370slm_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, NULL, NULL }, /* 440BX */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440BX] AEWIN AW-O671R", "awo671r", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 133333333, 1300, 3500, 1.5, 8.0, /* limits assumed */ MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 255, machine_at_awo671r_init, NULL }, + { "[i440BX] AEWIN AW-O671R", "awo671r", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_INTEL_440BX, machine_at_awo671r_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 133333333, 1300, 3500, 1.5, 8.0, /* limits assumed */ MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 524288, 8192, 255, NULL, NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440BX] ASUS CUBX", "cubx", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_cubx_init, NULL }, + { "[i440BX] ASUS CUBX", "cubx", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_INTEL_440BX, machine_at_cubx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 255, NULL, NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440BX] AmazePC AM-BX133", "ambx133", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 133333333, 1300, 3500, 1.5, 8.0, /* limits assumed */ MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_ambx133_init, NULL }, + { "[i440BX] AmazePC AM-BX133", "ambx133", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_INTEL_440BX, machine_at_ambx133_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 133333333, 1300, 3500, 1.5, 8.0, /* limits assumed */ MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, NULL, NULL }, /* 440ZX */ /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440ZX] Soltek SL-63A1", "63a1", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 524288, 8192, 255, machine_at_63a1_init, NULL }, + { "[i440ZX] Soltek SL-63A1", "63a1", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_INTEL_440ZX, machine_at_63a1_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 524288, 8192, 255, NULL, NULL }, /* SMSC VictoryBX-66 */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[SMSC VictoryBX-66] A-Trend ATC7020BXII","atc7020bxii", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_atc7020bxii_init, NULL }, + { "[SMSC VictoryBX-66] A-Trend ATC7020BXII", "atc7020bxii", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_SMSC_VICTORYBX_66, machine_at_atc7020bxii_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 255, NULL, NULL }, /* VIA Apollo Pro */ /* Has the VIA VT82C586B southbridge with on-chip KBC identical to the VIA VT82C42N. */ - { "[VIA Apollo Pro] PC Partner APAS3", "apas3", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, machine_at_apas3_init, NULL }, + { "[VIA Apollo Pro] PC Partner APAS3", "apas3", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_VIA_APOLLO_PRO, machine_at_apas3_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, NULL, NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[VIA Apollo Pro 133] ECS P6BAP", "p6bap", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1572864, 8192, 255, machine_at_p6bap_init, NULL }, + { "[VIA Apollo Pro 133] ECS P6BAP", "p6bap", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_VIA_APOLLO_PRO_133, machine_at_p6bap_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 1572864, 8192, 255, NULL, NULL }, /* Has the VIA VT82C686B southbridge with on-chip KBC identical to the VIA VT82C42N. */ - { "[VIA Apollo Pro 133A] Acorp 6VIA90AP", "6via90ap", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 150000000, 1300, 3500, MACHINE_MULTIPLIER_FIXED, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_BUS_AC97 | MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_GAMEPORT, 16384,3145728, 8192, 255, machine_at_6via90ap_init, NULL }, + { "[VIA Apollo Pro 133A] Acorp 6VIA90AP", "6via90ap", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, machine_at_6via90ap_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 150000000, 1300, 3500, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_A97, MACHINE_IDE_DUAL | MACHINE_AG, 16384, 3145728, 8192, 255, NULL, NULL }, /* Has the VIA VT82C686B southbridge with on-chip KBC identical to the VIA VT82C42N. */ - { "[VIA Apollo Pro 133A] ASUS CUV4X-LS", "cuv4xls", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 150000000, 1300, 3500, 1.5, 8.0, (MACHINE_AGP & ~MACHINE_AT) | MACHINE_BUS_PS2 | MACHINE_BUS_AC97 | MACHINE_IDE_DUAL | MACHINE_SOUND, 16384,4194304, 8192, 255, machine_at_cuv4xls_init, at_cuv4xls_get_device }, + { "[VIA Apollo Pro 133A] ASUS CUV4X-LS", "cuv4xls", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, machine_at_cuv4xls_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_PS2_NOI97, MACHINE_IDE_DUAL | MACHINE_SOUND, 16384, 4194304, 8192, 255, at_cuv4xls_get_device }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[VIA Apollo Pro 133A] BCM GT694VA", "gt694va", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_SOUND, 16384,3145728, 8192, 255, machine_at_gt694va_init, at_gt694va_get_device }, + { "[VIA Apollo Pro 133A] BCM GT694VA", "gt694va", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, machine_at_gt694va_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL | MACHINE_SOUND, 16384, 3145728, 8192, 255, at_gt694va_get_device }, /* Miscellaneous/Fake/Hypervisor machines */ /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440BX] Microsoft Virtual PC 2007", "vpc2007", MACHINE_TYPE_MISC, CPU_PKG_SLOT1, CPU_BLOCK(CPU_PENTIUM2, CPU_CYRIX3S), 0, 66666667, 0, 0, 0, 0, MACHINE_PCI | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, machine_at_vpc2007_init, NULL }, + { "[i440BX] Microsoft Virtual PC 2007", "vpc2007", MACHINE_TYPE_MISC, MACHINE_CHIPSET_INTEL_440BX, machine_at_vpc2007_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK(CPU_PENTIUM2, CPU_CYRIX3S), 0, 66666667, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 255, NULL, NULL }, - { NULL, NULL, MACHINE_TYPE_NONE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL } + { NULL, NULL, MACHINE_TYPE_NONE, MACHINE_CHIPSET_NONE, NULL, 0, 0, MACHINE_AVAILABLE, 0 , 0, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_BUS_NONE, MACHINE_FLAGS_NONE, 0, 0, 0, 0, NULL } }; - int machine_count(void) { return((sizeof(machines) / sizeof(machine_t)) - 1); } - char * machine_getname(void) { return((char *)machines[machine].name); } - char * machine_getname_ex(int m) { return((char *)machines[m].name); } - const device_t * machine_getdevice(int m) { if (machines[m].get_device) - return(machines[m].get_device()); + return(machines[m].get_device()); return(NULL); } +const device_t * +machine_getviddevice(int m) +{ + if (machines[m].get_vid_device) + return(machines[m].get_vid_device()); + + return(NULL); +} char * machine_get_internal_name(void) @@ -966,49 +1051,42 @@ machine_get_internal_name(void) return((char *)machines[machine].internal_name); } - char * machine_get_internal_name_ex(int m) { return((char *)machines[m].internal_name); } - int machine_get_nvrmask(int m) { return(machines[m].nvrmask); } - int machine_has_flags(int m, int flags) { return(machines[m].flags & flags); } - int machine_has_bus(int m, int bus_flags) { - return(machines[m].flags & bus_flags); + return(machines[m].bus_flags & bus_flags); } - int machine_has_cartridge(int m) { - return(machine_has_flags(m, MACHINE_CARTRIDGE) ? 1 : 0); + return(machine_has_bus(m, MACHINE_CARTRIDGE) ? 1 : 0); } - int machine_get_min_ram(int m) { return(machines[m].min_ram); } - int machine_get_max_ram(int m) { @@ -1019,30 +1097,27 @@ machine_get_max_ram(int m) #endif } - int machine_get_ram_granularity(int m) { return(machines[m].ram_granularity); } - int machine_get_type(int m) { return(machines[m].type); } - int machine_get_machine_from_internal_name(char *s) { int c = 0; while (machines[c].init != NULL) { - if (!strcmp(machines[c].internal_name, (const char *)s)) - return(c); - c++; + if (!strcmp(machines[c].internal_name, (const char *)s)) + return(c); + c++; } return(0); diff --git a/src/nvr_at.c b/src/nvr_at.c index d7b1a780f..b164d948d 100644 --- a/src/nvr_at.c +++ b/src/nvr_at.c @@ -290,11 +290,12 @@ #define RTC_REGS 14 /* number of registers */ -#define FLAG_AMI_1992_HACK 0x01 -#define FLAG_AMI_1994_HACK 0x02 -#define FLAG_AMI_1995_HACK 0x04 -#define FLAG_P6RP4_HACK 0x08 -#define FLAG_PIIX4 0x10 +#define FLAG_NO_NMI 0x01 +#define FLAG_AMI_1992_HACK 0x02 +#define FLAG_AMI_1994_HACK 0x04 +#define FLAG_AMI_1995_HACK 0x08 +#define FLAG_P6RP4_HACK 0x10 +#define FLAG_PIIX4 0x20 typedef struct { @@ -667,8 +668,7 @@ nvr_write(uint16_t addr, uint8_t val, void *priv) local->addr[addr_id] = (local->addr[addr_id] & 0x7f) | 0x80; if (local->bank[addr_id] > 0) local->addr[addr_id] = (local->addr[addr_id] & 0x7f) | (0x80 * local->bank[addr_id]); - if (!(machines[machine].flags & MACHINE_MCA) && - !(machines[machine].flags & MACHINE_NONMI)) + if (!(local->flags & FLAG_NO_NMI)) nmi_mask = (~val & 0x80); } } @@ -1033,12 +1033,16 @@ nvr_at_init(const device_t *info) nvr->irq = 8; local->cent = RTC_CENTURY_PS; local->def = 0x00; + if (info->local & 8) + local->flags |= FLAG_NO_NMI; break; case 3: /* Amstrad PC's */ nvr->irq = 1; local->cent = RTC_CENTURY_AT; local->def = 0xff; + if (info->local & 8) + local->flags |= FLAG_NO_NMI; break; case 4: /* IBM AT */ @@ -1204,6 +1208,26 @@ const device_t piix4_nvr_device = { .config = NULL }; +const device_t ps_no_nmi_nvr_device = { + "PS/1 or PS/2 NVRAM (No NMI)", + "ps1_nvr", + DEVICE_PS2, + 10, + nvr_at_init, nvr_at_close, nvr_at_reset, + { NULL }, nvr_at_speed_changed, + NULL +}; + +const device_t amstrad_no_nmi_nvr_device = { + "Amstrad NVRAM (No NMI)", + "amstrad_nvr", + DEVICE_ISA | DEVICE_AT, + 11, + nvr_at_init, nvr_at_close, nvr_at_reset, + { NULL }, nvr_at_speed_changed, + NULL +}; + const device_t ami_1992_nvr_device = { .name = "AMI Color 1992 PC/AT NVRAM", .internal_name = "ami_1992_nvr", diff --git a/src/qt/qt_deviceconfig.cpp b/src/qt/qt_deviceconfig.cpp index faf5a6ddc..3ea8cc0ab 100644 --- a/src/qt/qt_deviceconfig.cpp +++ b/src/qt/qt_deviceconfig.cpp @@ -130,7 +130,7 @@ void DeviceConfig::ConfigureDevice(const _device_* device, int instance, Setting break; } - for (auto* sel = config->selection; (sel->description != nullptr) && (strlen(sel->description) > 0); ++sel) { + for (auto* sel = config->selection; (sel != nullptr) && (sel->description != nullptr) && (strlen(sel->description) > 0); ++sel) { int row = Models::AddEntry(model, sel->description, sel->value); if (selected == sel->value) { currentIndex = row; diff --git a/src/win/win_devconf.c b/src/win/win_devconf.c index 42197ff33..e8c178b91 100644 --- a/src/win/win_devconf.c +++ b/src/win/win_devconf.c @@ -81,7 +81,7 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) (char *) config->name, config->default_int); c = 0; - while (selection->description && selection->description[0]) { + while (selection && selection->description && selection->description[0]) { mbstowcs(lptsTemp, selection->description, strlen(selection->description) + 1); SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)lptsTemp); @@ -146,7 +146,7 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) (char *) config->name, config->default_int); c = 0; - while (selection->description && selection->description[0]) { + while (selection && selection->description && selection->description[0]) { mbstowcs(lptsTemp, selection->description, strlen(selection->description) + 1); SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)lptsTemp); @@ -163,7 +163,7 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) (char *) config->name, config->default_int); c = 0; - while (selection->description && selection->description[0]) { + while (selection && selection->description && selection->description[0]) { mbstowcs(lptsTemp, selection->description, strlen(selection->description) + 1); SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)lptsTemp); @@ -391,6 +391,8 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) id++; break; case CONFIG_SELECTION: + case CONFIG_HEX16: + case CONFIG_HEX20: case CONFIG_MIDI_OUT: case CONFIG_MIDI_IN: case CONFIG_SPINNER: From 50ef360282e81049986daba0c0eeae28e7518831 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 2 Apr 2022 16:50:17 -0400 Subject: [PATCH 22/78] src/device --- src/device/isamem.c | 694 +++++++++++++++++++++++++++----------- src/device/mouse_bus.c | 129 ++++--- src/device/mouse_ps2.c | 19 +- src/device/mouse_serial.c | 76 +++-- src/device/postcard.c | 1 - 5 files changed, 654 insertions(+), 265 deletions(-) diff --git a/src/device/isamem.c b/src/device/isamem.c index 7ca7d2372..4fd3e6ab2 100644 --- a/src/device/isamem.c +++ b/src/device/isamem.c @@ -683,16 +683,34 @@ isamem_close(void *priv) static const device_config_t ibmxt_config[] = { // clang-format off { - "size", "Memory Size", CONFIG_SPINNER, "", 128, "", - { 0, 512, 16 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 128, + .file_filter = "", + .spinner = { + .min = 0, + .max = 512, + .step = 16 + }, + .selection = { { 0 } } }, { - "start", "Start Address", CONFIG_SPINNER, "", 256, "", - { 0, 576, 64 }, - { { 0 } } + .name = "start", + .description = "Start Address", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 256, + .file_filter = "", + .spinner = { + .min = 0, + .max = 576, + .step = 64 + }, + .selection = { { 0 } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -713,16 +731,34 @@ static const device_t ibmxt_device = { static const device_config_t genericxt_config[] = { // clang-format off { - "size", "Memory Size", CONFIG_SPINNER, "", 16, "", - { 0, 640, 16 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 16, + .file_filter = "", + .spinner = { + .min = 0, + .max = 640, + .step = 16 + }, + .selection = { { 0 } } }, { - "start", "Start Address", CONFIG_SPINNER, "", 0, "", - { 0, 624, 16 }, - { { 0 } } + .name = "start", + .description = "Start Address", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { + .min = 0, + .max = 624, + .step = 16 + }, + .selection = { { 0 } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -743,16 +779,34 @@ static const device_t genericxt_device = { static const device_config_t msramcard_config[] = { // clang-format off { - "size", "Memory Size", CONFIG_SPINNER, "", 64, "", - { 0, 256, 64 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 64, + .file_filter = "", + .spinner = { + .min = 0, + .max = 256, + .step = 64 + }, + .selection = { { 0 } } }, { - "start", "Start Address", CONFIG_SPINNER, "", 0, "", - { 0, 624, 64 }, - { { 0 } } + .name = "start", + .description = "Start Address", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { + .min = 0, + .max = 624, + .step = 64 + }, + .selection = { { 0 } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -773,16 +827,34 @@ static const device_t msramcard_device = { static const device_config_t mssystemcard_config[] = { // clang-format off { - "size", "Memory Size", CONFIG_SPINNER, "", 64, "", - { 0, 256, 64 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 64, + .file_filter = "", + .spinner = { + .min = 0, + .max = 256, + .step = 64 + }, + .selection = { { 0 } } }, { - "start", "Start Address", CONFIG_SPINNER, "", 0, "", - { 0, 624, 64 }, - { { 0 } } + .name = "start", + .description = "Start Address", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { + .min = 0, + .max = 624, + .step = 64 + }, + .selection = { { 0 } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -803,16 +875,34 @@ static const device_t mssystemcard_device = { static const device_config_t ibmat_config[] = { // clang-format off { - "size", "Memory Size", CONFIG_SPINNER, "", 512, "", - { 0, 12288, 512 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 512, + .file_filter = "", + .spinner = { + .min = 0, + .max = 12288, + .step = 512 + }, + .selection = { { 0 } } }, { - "start", "Start Address", CONFIG_SPINNER, "", 512, "", - { 0, 15872, 512 }, - { { 0 } } + .name = "start", + .description = "Start Address", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 512, + .file_filter = "", + .spinner = { + .min = 0, + .max = 15872, + .step = 512 + }, + .selection = { { 0 } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -833,16 +923,34 @@ static const device_t ibmat_device = { static const device_config_t genericat_config[] = { // clang-format off { - "size", "Memory Size", CONFIG_SPINNER, "", 512, "", - { 0, 16384, 512 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 512, + .file_filter = "", + .spinner = { + .min = 0, + .max = 16384, + .step = 512 + }, + .selection = { { 0 } } }, { - "start", "Start Address", CONFIG_SPINNER, "", 512, "", - { 0, 15872, 128 }, - { { 0 } } + .name = "start", + .description = "Start Address", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 512, + .file_filter = "", + .spinner = { + .min = 0, + .max = 15872, + .step = 128 + }, + .selection = { { 0 } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -863,16 +971,34 @@ static const device_t genericat_device = { static const device_config_t p5pak_config[] = { // clang-format off { - "size", "Memory Size", CONFIG_SPINNER, "", 128, "", - { 0, 384, 64 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 128, + .file_filter = "", + .spinner = { + .min = 0, + .max = 384, + .step = 64 + }, + .selection = { { 0 } } }, { - "start", "Start Address", CONFIG_SPINNER, "", 512, "", - { 64, 576, 64 }, - { { 0 } } + .name = "start", + .description = "Start Address", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 512, + .file_filter = "", + .spinner = { + .min = 64, + .max = 576, + .step = 64 + }, + .selection = { { 0 } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -894,16 +1020,34 @@ static const device_t p5pak_device = { static const device_config_t a6pak_config[] = { // clang-format off { - "size", "Memory Size", CONFIG_SPINNER, "", 64, "", - { 0, 576, 64 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 64, + .file_filter = "", + .spinner = { + .min = 0, + .max = 576, + .step = 64 + }, + .selection = { { 0 } } }, { - "start", "Start Address", CONFIG_SPINNER, "", 256, "", - { 64, 512, 64 }, - { { 0 } } + .name = "start", + .description = "Start Address", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 256, + .file_filter = "", + .spinner = { + .min = 64, + .max = 512, + .step = 64 + }, + .selection = { { 0 } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -924,22 +1068,37 @@ static const device_t a6pak_device = { static const device_config_t ems5150_config[] = { // clang-format off { - "size", "Memory Size", CONFIG_SPINNER, "", 256, "", - { 0, 2048, 64 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 256, + .file_filter = "", + .spinner = { + .min = 0, + .max = 2048, + .step = 64 + }, + .selection = { { 0 } } }, { - "base", "Address", CONFIG_HEX16, "", 0, "", { 0 }, - { - { "Disabled", 0x0000 }, - { "Board 1", 0x0208 }, - { "Board 2", 0x020a }, - { "Board 3", 0x020c }, - { "Board 4", 0x020e }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0x0000 }, + { .description = "Board 1", .value = 0x0208 }, + { .description = "Board 2", .value = 0x020a }, + { .description = "Board 3", .value = 0x020c }, + { .description = "Board 4", .value = 0x020e }, + { .description = "" } }, }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -960,58 +1119,109 @@ static const device_t ems5150_device = { static const device_config_t ev159_config[] = { // clang-format off { - "size", "Memory Size", CONFIG_SPINNER, "", 512, "", - { 0, 3072, 512 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 512, + .file_filter = "", + .spinner = { + .min = 0, + .max = 3072, + .step = 512 + }, + .selection = { { 0 } } }, { - "start", "Start Address", CONFIG_SPINNER, "", 0, "", - { 0, 16128, 128 }, - { { 0 } } + .name = "start", + .description = "Start Address", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { + .min = 0, + .max = 16128, + .step = 128 + }, + .selection = { { 0 } } }, { - "length", "Contiguous Size", CONFIG_SPINNER, "", 0, "", - { 0, 16384, 128 }, - { { 0 } } + .name = "length", + .description = "Contiguous Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { + .min = 0, + .max = 16384, + .step = 128 + }, + .selection = { { 0 } } }, { - "width", "I/O Width", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "8-bit", 0 }, - { "16-bit", 1 }, - { "" } + .name = "width", + .description = "I/O Width", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "8-bit", .value = 0 }, + { .description = "16-bit", .value = 1 }, + { .description = "" } }, }, { - "speed", "Transfer Speed", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Standard (150ns)", 0 }, - { "High-Speed (120ns)", 1 }, - { "" } + .name = "speed", + .description = "Transfer Speed", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Standard (150ns)", .value = 0 }, + { .description = "High-Speed (120ns)", .value = 1 }, + { .description = "" } } }, { - "ems", "EMS mode", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Disabled", 0 }, - { "Enabled", 1 }, - { "" } + .name = "ems", + .description = "EMS mode", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0 }, + { .description = "Enabled", .value = 1 }, + { .description = "" } }, }, { - "base", "Address", CONFIG_HEX16, "", 0x0258, "", { 0 }, - { - { "208H", 0x0208 }, - { "218H", 0x0218 }, - { "258H", 0x0258 }, - { "268H", 0x0268 }, - { "2A8H", 0x02A8 }, - { "2B8H", 0x02B8 }, - { "2E8H", 0x02E8 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x0258, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "208H", .value = 0x0208 }, + { .description = "218H", .value = 0x0218 }, + { .description = "258H", .value = 0x0258 }, + { .description = "268H", .value = 0x0268 }, + { .description = "2A8H", .value = 0x02A8 }, + { .description = "2B8H", .value = 0x02B8 }, + { .description = "2E8H", .value = 0x02E8 }, + { .description = "" } }, }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -1033,47 +1243,79 @@ static const device_t ev159_device = { static const device_config_t brat_config[] = { // clang-format off { - "base", "Address", CONFIG_HEX16, "", 0x0258, "", { 0 }, - { - { "208H", 0x0208 }, - { "218H", 0x0218 }, - { "258H", 0x0258 }, - { "268H", 0x0268 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x0258, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "208H", .value = 0x0208 }, + { .description = "218H", .value = 0x0218 }, + { .description = "258H", .value = 0x0258 }, + { .description = "268H", .value = 0x0268 }, + { .description = "" } }, }, { - "frame", "Frame Address", CONFIG_HEX20, "", 0, "", { 0 }, - { - { "Disabled", 0x00000 }, - { "D000H", 0xD0000 }, - { "E000H", 0xE0000 }, - { "" } + .name = "frame", + .description = "Frame Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0x00000 }, + { .description = "D000H", .value = 0xD0000 }, + { .description = "E000H", .value = 0xE0000 }, + { .description = "" } }, }, { - "width", "I/O Width", CONFIG_SELECTION, "", 8, "", { 0 }, - { - { "8-bit", 8 }, - { "16-bit", 16 }, - { "" } + .name = "width", + .description = "I/O Width", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 8, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "8-bit", .value = 8 }, + { .description = "16-bit", .value = 16 }, + { .description = "" } }, }, { - "speed", "Transfer Speed", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Standard", 0 }, - { "High-Speed", 1 }, - { "" } + .name = "speed", + .description = "Transfer Speed", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Standard", .value = 0 }, + { .description = "High-Speed", .value = 1 }, + { .description = "" } } }, { - "size", "Memory Size", CONFIG_SPINNER, "", 128, - "", - { 0, 8192, 512 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 128, + .file_filter = "", + .spinner = { + .min = 0, + .max = 8192, + .step = 512 + }, + .selection = { { 0 } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -1096,50 +1338,83 @@ static const device_t brat_device = { static const device_config_t rampage_config[] = { // clang-format off { - "base", "Address", CONFIG_HEX16, "", 0x0258, "", { 0 }, - { - { "208H", 0x0208 }, - { "218H", 0x0218 }, - { "258H", 0x0258 }, - { "268H", 0x0268 }, - { "2A8H", 0x02A8 }, - { "2B8H", 0x02B8 }, - { "2E8H", 0x02E8 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x0258, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "208H", .value = 0x0208 }, + { .description = "218H", .value = 0x0218 }, + { .description = "258H", .value = 0x0258 }, + { .description = "268H", .value = 0x0268 }, + { .description = "2A8H", .value = 0x02A8 }, + { .description = "2B8H", .value = 0x02B8 }, + { .description = "2E8H", .value = 0x02E8 }, + { .description = "" } }, }, { - "frame", "Frame Address", CONFIG_HEX20, "", 0, "", { 0 }, - { - { "Disabled", 0x00000 }, - { "C000H", 0xC0000 }, - { "D000H", 0xD0000 }, - { "E000H", 0xE0000 }, - { "" } + .name = "frame", + .description = "Frame Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0x00000 }, + { .description = "C000H", .value = 0xC0000 }, + { .description = "D000H", .value = 0xD0000 }, + { .description = "E000H", .value = 0xE0000 }, + { .description = "" } }, }, { - "width", "I/O Width", CONFIG_SELECTION, "", 8, "", { 0 }, - { - { "8-bit", 8 }, - { "16-bit", 16 }, - { "" } + .name = "width", + .description = "I/O Width", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 8, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "8-bit", .value = 8 }, + { .description = "16-bit", .value = 16 }, + { .description = "" } }, }, { - "speed", "Transfer Speed", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Standard", 0 }, - { "High-Speed", 1 }, - { "" } + .name = "speed", + .description = "Transfer Speed", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Standard", .value = 0 }, + { .description = "High-Speed", .value = 1 }, + { .description = "" } } }, { - "size", "Memory Size", CONFIG_SPINNER, "", 128, "", - { 0, 8192, 128 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 128, + .file_filter = "", + .spinner = { + .min = 0, + .max = 8192, + .step = 128 + }, + .selection = { { 0 } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -1162,50 +1437,83 @@ static const device_t rampage_device = { static const device_config_t iab_config[] = { // clang-format off { - "base", "Address", CONFIG_HEX16, "", 0x0258, "", { 0 }, - { - { "208H", 0x0208 }, - { "218H", 0x0218 }, - { "258H", 0x0258 }, - { "268H", 0x0268 }, - { "2A8H", 0x02A8 }, - { "2B8H", 0x02B8 }, - { "2E8H", 0x02E8 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x0258, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "208H", .value = 0x0208 }, + { .description = "218H", .value = 0x0218 }, + { .description = "258H", .value = 0x0258 }, + { .description = "268H", .value = 0x0268 }, + { .description = "2A8H", .value = 0x02A8 }, + { .description = "2B8H", .value = 0x02B8 }, + { .description = "2E8H", .value = 0x02E8 }, + { .description = "" } }, }, { - "frame", "Frame Address", CONFIG_HEX20, "", 0, "", { 0 }, - { - { "Disabled", 0x00000 }, - { "C000H", 0xC0000 }, - { "D000H", 0xD0000 }, - { "E000H", 0xE0000 }, - { "" } + .name = "frame", + .description = "Frame Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0x00000 }, + { .description = "C000H", .value = 0xC0000 }, + { .description = "D000H", .value = 0xD0000 }, + { .description = "E000H", .value = 0xE0000 }, + { .description = "" } }, }, { - "width", "I/O Width", CONFIG_SELECTION, "", 8, "", { 0 }, - { - { "8-bit", 8 }, - { "16-bit", 16 }, - { "" } + .name = "width", + .description = "I/O Width", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 8, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "8-bit", .value = 8 }, + { .description = "16-bit", .value = 16 }, + { .description = "" } }, }, { - "speed", "Transfer Speed", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Standard", 0 }, - { "High-Speed", 1 }, - { "" } + .name = "speed", + .description = "Transfer Speed", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Standard", .value = 0 }, + { .description = "High-Speed", .value = 1 }, + { .description = "" } } }, { - "size", "Memory Size", CONFIG_SPINNER, "", 128, "", - { 0, 8192, 128 }, - { { 0 } } + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 128, + .file_filter = "", + .spinner = { + .min = 0, + .max = 8192, + .step = 128 + }, + .selection = { { 0 } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/device/mouse_bus.c b/src/device/mouse_bus.c index f201c4f1f..2a098a22b 100644 --- a/src/device/mouse_bus.c +++ b/src/device/mouse_bus.c @@ -696,71 +696,120 @@ bm_init(const device_t *info) static const device_config_t lt_config[] = { // clang-format off { - "base", "Address", CONFIG_HEX16, "", 0x23c, "", { 0 }, { - { "0x230", 0x230 }, - { "0x234", 0x234 }, - { "0x238", 0x238 }, - { "0x23C", 0x23c }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x23c, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "0x230", .value = 0x230 }, + { .description = "0x234", .value = 0x234 }, + { .description = "0x238", .value = 0x238 }, + { .description = "0x23C", .value = 0x23c }, + { .description = "" } } }, { - "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, { - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 4", 4 }, - { "IRQ 5", 5 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 2", .value = 2 }, + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 4", .value = 4 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "" } } }, { - "hz", "Hz", CONFIG_SELECTION, "", 45, "", { 0 }, { - { "Non-timed (original)", 0 }, - { "30 Hz (JMP2 = 1)", 30 }, - { "45 Hz (JMP2 not populated)", 45 }, - { "60 Hz (JMP 2 = 2)", 60 }, - { "" } + .name = "hz", + .description = "Hz", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 45, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Non-timed (original)", .value = 0 }, + { .description = "30 Hz (JMP2 = 1)", .value = 30 }, + { .description = "45 Hz (JMP2 not populated)", .value = 45 }, + { .description = "60 Hz (JMP 2 = 2)", .value = 60 }, + { .description = "" } } }, { - "buttons", "Buttons", CONFIG_SELECTION, "", 2, "", { 0 }, { - { "Two", 2 }, - { "Three", 3 }, - { "" } + .name = "buttons", + .description = "Buttons", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 2, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Two", .value = 2 }, + { .description = "Three", .value = 3 }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; static const device_config_t ms_config[] = { // clang-format off { - "base", "Address", CONFIG_HEX16, "", 0x23c, "", { 0 }, { - { "0x230", 0x230 }, - { "0x234", 0x234 }, - { "0x238", 0x238 }, - { "0x23C", 0x23c }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x23c, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "0x230", .value = 0x230 }, + { .description = "0x234", .value = 0x234 }, + { .description = "0x238", .value = 0x238 }, + { .description = "0x23C", .value = 0x23c }, + { .description = "" } } }, { - "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, { - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 4", 4 }, - { "IRQ 5", 5 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 2", .value = 2 }, + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 4", .value = 4 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "" } } }, { - "buttons", "Buttons", CONFIG_SELECTION, "", 2, "", { 0 }, { - { "Two", 2 }, - { "Three", 3 }, - { "" } + .name = "buttons", + .description = "Buttons", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 2, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Two", .value = 2 }, + { .description = "Three", .value = 3 }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/device/mouse_ps2.c b/src/device/mouse_ps2.c index 8757f01ee..cd4225e11 100644 --- a/src/device/mouse_ps2.c +++ b/src/device/mouse_ps2.c @@ -332,15 +332,22 @@ ps2_close(void *priv) static const device_config_t ps2_config[] = { // clang-format off { - "buttons", "Buttons", CONFIG_SELECTION, "", 2, "", { 0 }, { - { "Two", 2 }, - { "Three", 3 }, - { "Wheel", 4 }, - { "" } + .name = "buttons", + .description = "Buttons", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 2, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Two", .value = 2 }, + { .description = "Three", .value = 3 }, + { .description = "Wheel", .value = 4 }, + { .description = "" } } }, { - "", "", -1 + .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/device/mouse_serial.c b/src/device/mouse_serial.c index 71d628558..68b570565 100644 --- a/src/device/mouse_serial.c +++ b/src/device/mouse_serial.c @@ -828,50 +828,76 @@ sermouse_init(const device_t *info) return(dev); } - static const device_config_t mssermouse_config[] = { // clang-format off { - "port", "Serial Port", CONFIG_SELECTION, "", 0, "", { 0 }, { - { "COM1", 0 }, - { "COM2", 1 }, - { "COM3", 2 }, - { "COM4", 3 }, - { "" } + .name = "port", + .description = "Serial Port", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "COM1", .value = 0 }, + { .description = "COM2", .value = 1 }, + { .description = "COM3", .value = 2 }, + { .description = "COM4", .value = 3 }, + { .description = "" } } }, { - "buttons", "Buttons", CONFIG_SELECTION, "", 2, "", { 0 }, { - { "Two", 2 }, - { "Three", 3 }, - { "Wheel", 4 }, - { "" } + .name = "buttons", + .description = "Buttons", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 2, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Two", .value = 2 }, + { .description = "Three", .value = 3 }, + { .description = "Wheel", .value = 4 }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; - static const device_config_t ltsermouse_config[] = { // clang-format off { - "port", "Serial Port", CONFIG_SELECTION, "", 0, "", { 0 }, { - { "COM1", 0 }, - { "COM2", 1 }, - { "COM3", 2 }, - { "COM4", 3 }, - { "" } + .name = "port", + .description = "Serial Port", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "COM1", .value = 0 }, + { .description = "COM2", .value = 1 }, + { .description = "COM3", .value = 2 }, + { .description = "COM4", .value = 3 }, + { .description = "" } } }, { - "buttons", "Buttons", CONFIG_SELECTION, "", 2, "", { 0 }, { - { "Two", 2 }, - { "Three", 3 }, - { "" } + .name = "buttons", + .description = "Buttons", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 2, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Two", .value = 2 }, + { .description = "Three", .value = 3 }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/device/postcard.c b/src/device/postcard.c index 3fb06680d..22598613f 100644 --- a/src/device/postcard.c +++ b/src/device/postcard.c @@ -139,7 +139,6 @@ postcard_close(UNUSED(void *priv)) NULL, NULL, NULL, postcard_write, NULL, NULL, NULL); } - const device_t postcard_device = { .name = "POST Card", .internal_name = "postcard", From c01ab374a48c30460bbc0e90ffa7a147e197d091 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 2 Apr 2022 17:08:04 -0400 Subject: [PATCH 23/78] src/disk --- src/disk/hdc_esdi_at.c | 1 - src/disk/hdc_esdi_mca.c | 1 - src/disk/hdc_ide.c | 69 ++++++----- src/disk/hdc_ide_cmd640.c | 1 - src/disk/hdc_ide_cmd646.c | 1 - src/disk/hdc_ide_opti611.c | 1 - src/disk/hdc_ide_sff8038i.c | 1 - src/disk/hdc_st506_at.c | 1 - src/disk/hdc_st506_xt.c | 220 ++++++++++++++++++++++++------------ src/disk/hdc_xta.c | 51 ++++++--- src/disk/hdc_xtide.c | 1 - 11 files changed, 220 insertions(+), 128 deletions(-) diff --git a/src/disk/hdc_esdi_at.c b/src/disk/hdc_esdi_at.c index fb9ef7479..7ac6b42d2 100644 --- a/src/disk/hdc_esdi_at.c +++ b/src/disk/hdc_esdi_at.c @@ -843,7 +843,6 @@ wd1007vse1_available(void) return(rom_present(BIOS_FILE)); } - const device_t esdi_at_wd1007vse1_device = { .name = "Western Digital WD1007V-SE1 (ESDI)", .internal_name = "esdi_at", diff --git a/src/disk/hdc_esdi_mca.c b/src/disk/hdc_esdi_mca.c index d3c2b9e88..3c29a9265 100644 --- a/src/disk/hdc_esdi_mca.c +++ b/src/disk/hdc_esdi_mca.c @@ -1178,7 +1178,6 @@ esdi_available(void) return(rom_present(BIOS_FILE_L) && rom_present(BIOS_FILE_H)); } - const device_t esdi_ps2_device = { .name = "IBM PS/2 ESDI Fixed Disk Adapter (MCA)", .internal_name = "esdi_mca", diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index d0ca2c84e..eaa61e94f 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -3062,7 +3062,6 @@ ide_close(void *priv) } } - const device_t ide_isa_device = { .name = "ISA PC/AT IDE Controller", .internal_name = "ide_isa", @@ -3150,42 +3149,54 @@ const device_t ide_pci_2ch_device = { // clang-format off static const device_config_t ide_ter_config[] = { { - "irq", "IRQ", CONFIG_SELECTION, "", 10, "", { 0 }, - { - { "Plug and Play", -1 }, - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 4", 4 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "IRQ 9", 9 }, - { "IRQ 10", 10 }, - { "IRQ 11", 11 }, - { "IRQ 12", 12 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 10, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Plug and Play", .value = -1 }, + { .description = "IRQ 2", .value = 2 }, + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 4", .value = 4 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 7", .value = 7 }, + { .description = "IRQ 9", .value = 9 }, + { .description = "IRQ 10", .value = 10 }, + { .description = "IRQ 11", .value = 11 }, + { .description = "IRQ 12", .value = 12 }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t ide_qua_config[] = { { - "irq", "IRQ", CONFIG_SELECTION, "", 11, "", { 0 }, - { - { "Plug and Play", -1 }, - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 4", 4 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "IRQ 9", 9 }, - { "IRQ 10", 10 }, - { "IRQ 11", 11 }, - { "IRQ 12", 12 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 11, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Plug and Play", .value = -1 }, + { .description = "IRQ 2", .value = 2 }, + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 4", .value = 4 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 7", .value = 7 }, + { .description = "IRQ 9", .value = 9 }, + { .description = "IRQ 10", .value = 10 }, + { .description = "IRQ 11", .value = 11 }, + { .description = "IRQ 12", .value = 12 }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; // clang-format on diff --git a/src/disk/hdc_ide_cmd640.c b/src/disk/hdc_ide_cmd640.c index dec8fac18..79c6e4f97 100644 --- a/src/disk/hdc_ide_cmd640.c +++ b/src/disk/hdc_ide_cmd640.c @@ -491,7 +491,6 @@ cmd640_init(const device_t *info) return dev; } - const device_t ide_cmd640_vlb_device = { .name = "CMD PCI-0640B VLB", .internal_name = "ide_cmd640_vlb", diff --git a/src/disk/hdc_ide_cmd646.c b/src/disk/hdc_ide_cmd646.c index 960a07b16..da721f3b6 100644 --- a/src/disk/hdc_ide_cmd646.c +++ b/src/disk/hdc_ide_cmd646.c @@ -406,7 +406,6 @@ cmd646_init(const device_t *info) return dev; } - const device_t ide_cmd646_device = { .name = "CMD PCI-0646", .internal_name = "ide_cmd646", diff --git a/src/disk/hdc_ide_opti611.c b/src/disk/hdc_ide_opti611.c index e53971768..2cbf8e1a2 100644 --- a/src/disk/hdc_ide_opti611.c +++ b/src/disk/hdc_ide_opti611.c @@ -311,7 +311,6 @@ opti611_init(const device_t *info) return dev; } - const device_t ide_opti611_vlb_device = { .name = "OPTi 82C611/82C611A VLB", .internal_name = "ide_opti611_vlb", diff --git a/src/disk/hdc_ide_sff8038i.c b/src/disk/hdc_ide_sff8038i.c index 7caecc37d..f15cc6dcb 100644 --- a/src/disk/hdc_ide_sff8038i.c +++ b/src/disk/hdc_ide_sff8038i.c @@ -584,7 +584,6 @@ static void return dev; } - const device_t sff8038i_device = { .name = "SFF-8038i IDE Bus Master", diff --git a/src/disk/hdc_st506_at.c b/src/disk/hdc_st506_at.c index c510f5319..066c30c15 100644 --- a/src/disk/hdc_st506_at.c +++ b/src/disk/hdc_st506_at.c @@ -767,7 +767,6 @@ mfm_close(void *priv) ui_sb_update_icon(SB_HDD|HDD_BUS_MFM, 0); } - const device_t st506_at_wd1003_device = { .name = "WD1003 AT MFM/RLL Controller", .internal_name = "st506_at", diff --git a/src/disk/hdc_st506_xt.c b/src/disk/hdc_st506_xt.c index 4a4bb3395..9f582398b 100644 --- a/src/disk/hdc_st506_xt.c +++ b/src/disk/hdc_st506_xt.c @@ -1638,122 +1638,194 @@ wd1004a_27x_available(void) // clang-format off static const device_config_t dtc_config[] = { { - "bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 }, - { - { "Disabled", 0x00000 }, - { "C800H", 0xc8000 }, - { "CA00H", 0xca000 }, - { "D800H", 0xd8000 }, - { "F400H", 0xf4000 }, - { "" } + .name = "bios_addr", + .description = "BIOS address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xc8000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0x00000 }, + { .description = "C800H", .value = 0xc8000 }, + { .description = "CA00H", .value = 0xca000 }, + { .description = "D800H", .value = 0xd8000 }, + { .description = "F400H", .value = 0xf4000 }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t st11_config[] = { { - "base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 }, - { - { "320H", 0x0320 }, - { "324H", 0x0324 }, - { "328H", 0x0328 }, - { "32CH", 0x032c }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x0320, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "320H", .value = 0x0320 }, + { .description = "324H", .value = 0x0324 }, + { .description = "328H", .value = 0x0328 }, + { .description = "32CH", .value = 0x032c }, + { .description = "" } } }, { - "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 5", 5 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 2", .value = 2 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "" } } }, { - "bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 }, - { - { "Disabled", 0x00000 }, - { "C800H", 0xc8000 }, - { "D000H", 0xd0000 }, - { "D800H", 0xd8000 }, - { "E000H", 0xe0000 }, - { "" } + .name = "bios_addr", + .description = "BIOS address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xc8000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0x00000 }, + { .description = "C800H", .value = 0xc8000 }, + { .description = "D000H", .value = 0xd0000 }, + { .description = "D800H", .value = 0xd8000 }, + { .description = "E000H", .value = 0xe0000 }, + { .description = "" } } }, { - "revision", "Board Revision", CONFIG_SELECTION, "", 19, "", { 0 }, - { - { "Rev. 05 (v1.7)", 5 }, - { "Rev. 19 (v2.0)", 19 }, - { "" } + .name = "revision", + .description = "Board Revision", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 19, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Rev. 05 (v1.7)", .value = 5 }, + { .description = "Rev. 19 (v2.0)", .value = 19 }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t wd_config[] = { { - "bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 }, - { - { "Disabled", 0x00000 }, - { "C800H", 0xc8000 }, - { "" } + .name = "bios_addr", + .description = "BIOS address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xc8000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0x00000 }, + { .description = "C800H", .value = 0xc8000 }, + { .description = "" } } }, { - "base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 }, - { - { "320H", 0x0320 }, - { "324H", 0x0324 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x0320, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "320H", .value = 0x0320 }, + { .description = "324H", .value = 0x0324 }, + { .description = "" } } }, { - "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 5", 5 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 2", .value = 2 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t wd_rll_config[] = { { - "bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 }, - { - { "Disabled", 0x00000 }, - { "C800H", 0xc8000 }, - { "" } + .name = "bios_addr", + .description = "BIOS address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xc8000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0x00000 }, + { .description = "C800H", .value = 0xc8000 }, + { .description = "" } } }, { - "base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 }, - { - { "320H", 0x0320 }, - { "324H", 0x0324 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x0320, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "320H", .value = 0x0320 }, + { .description = "324H", .value = 0x0324 }, + { .description = "" } } }, { - "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 5", 5 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 2", .value = 2 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "" } } }, { - "translate", "Translate 26 -> 17", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Off", 0 }, - { "On", 1 }, - { "" } + .name = "translate", + .description = "Translate 26 -> 17", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Off", .value = 0 }, + { .description = "On", .value = 1 }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t wd1004a_config[] = { @@ -1799,7 +1871,7 @@ static const device_config_t wd1004a_config[] = { { .description = "" } } }, - { .name = "", .description = "", .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t wd1004_rll_config[] = { @@ -1864,7 +1936,7 @@ static const device_config_t wd1004_rll_config[] = { { .description = "" } } }, - { .name = "", .description = "", .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; // clang-format on diff --git a/src/disk/hdc_xta.c b/src/disk/hdc_xta.c index 754a4114a..ea92bcd59 100644 --- a/src/disk/hdc_xta.c +++ b/src/disk/hdc_xta.c @@ -1102,34 +1102,51 @@ xta_close(void *priv) free(dev); } - static const device_config_t wdxt150_config[] = { // clang-format off { - "base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 }, /*W2*/ - { - { "320H", 0x0320 }, - { "324H", 0x0324 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x0320, + .file_filter = "", + .spinner = { 0 }, /*W2*/ + .selection = { + { .description = "320H", .value = 0x0320 }, + { .description = "324H", .value = 0x0324 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, /*W3*/ - { - { "IRQ 5", 5 }, - { "IRQ 4", 4 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, /*W3*/ + .selection = { + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 4", .value = 4 }, + { .description = "" } }, }, { - "bios_addr", "BIOS Address", CONFIG_HEX20, "", 0xc8000, "", { 0 }, /*W1*/ - { - { "C800H", 0xc8000 }, - { "CA00H", 0xca000 }, - { "" } + .name = "bios_addr", + .description = "BIOS Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xc8000, + .file_filter = "", + .spinner = { 0 }, /*W1*/ + .selection = { + { .description = "C800H", .value = 0xc8000 }, + { .description = "CA00H", .value = 0xca000 }, + { .description = "" } }, }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format off }; diff --git a/src/disk/hdc_xtide.c b/src/disk/hdc_xtide.c index 51c8dbf4a..34805db2b 100644 --- a/src/disk/hdc_xtide.c +++ b/src/disk/hdc_xtide.c @@ -259,7 +259,6 @@ xtide_at_close(void *priv) free(xtide); } - const device_t xtide_device = { .name = "PC/XT XTIDE", .internal_name = "xtide", From f51c8a5595ee3f172227d3d7e4beb5d74100fda4 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 2 Apr 2022 17:48:11 -0400 Subject: [PATCH 24/78] src/floppy --- src/floppy/fdc_magitronic.c | 17 +++++++++++------ src/floppy/fdc_pii15xb.c | 22 ++++++++++++++-------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/floppy/fdc_magitronic.c b/src/floppy/fdc_magitronic.c index a27e19748..ba9e9a580 100644 --- a/src/floppy/fdc_magitronic.c +++ b/src/floppy/fdc_magitronic.c @@ -114,11 +114,17 @@ static int b215_available(void) static const device_config_t b215_config[] = { // clang-format off { - "bios_addr", "BIOS Address:", CONFIG_HEX20, "", 0xca000, "", { 0 }, - { - { "CA00H", 0xca000 }, - { "CC00H", 0xcc000 }, - { "" } + .name = "bios_addr", + .description = "BIOS Address:", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xca000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "CA00H", .value = 0xca000 }, + { .description = "CC00H", .value = 0xcc000 }, + { .description = "" } } }, { "", "", -1 } @@ -138,4 +144,3 @@ const device_t fdc_b215_device = { .force_redraw = NULL, .config = b215_config }; - diff --git a/src/floppy/fdc_pii15xb.c b/src/floppy/fdc_pii15xb.c index 2e865ec56..42b72885f 100644 --- a/src/floppy/fdc_pii15xb.c +++ b/src/floppy/fdc_pii15xb.c @@ -124,16 +124,22 @@ static int pii_158_available(void) static const device_config_t pii_config[] = { // clang-format off { - "bios_addr", "BIOS Address:", CONFIG_HEX20, "", 0xce000, "", { 0 }, - { - { "Disabled", 0 }, - { "CA00H", 0xca000 }, - { "CC00H", 0xcc000 }, - { "CE00H", 0xce000 }, - { "" } + .name = "bios_addr", + .description = "BIOS Address:", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xce000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0 }, + { .description = "CA00H", .value = 0xca000 }, + { .description = "CC00H", .value = 0xcc000 }, + { .description = "CE00H", .value = 0xce000 }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; From e11bad193823bac012f944898471c67827debb1f Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 2 Apr 2022 18:14:24 -0400 Subject: [PATCH 25/78] src/machine --- src/machine/m_amstrad.c | 13 ++++++------- src/machine/m_at_compaq.c | 2 +- src/machine/m_europc.c | 4 ++-- src/machine/m_pcjr.c | 2 +- src/machine/m_tandy.c | 2 +- src/machine/m_xt_olivetti.c | 5 ++--- src/machine/m_xt_t1000_vid.c | 18 ++++++------------ src/machine/m_xt_xi8088.c | 2 +- 8 files changed, 20 insertions(+), 28 deletions(-) diff --git a/src/machine/m_amstrad.c b/src/machine/m_amstrad.c index ba6470120..e05d0d23e 100644 --- a/src/machine/m_amstrad.c +++ b/src/machine/m_amstrad.c @@ -669,7 +669,6 @@ vid_speed_change_1512(void *priv) recalc_timings_1512(vid); } - device_config_t vid_1512_config[] = { { .name = "display_type", @@ -720,7 +719,7 @@ device_config_t vid_1512_config[] = { { .description = "" } } }, - { .name = "", .description = "", .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_t vid_1512_device = { @@ -903,7 +902,7 @@ device_config_t vid_1640_config[] = { { .description = "" } } }, - { .name = "", .description = "", .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_t vid_1640_device = { @@ -1788,7 +1787,7 @@ device_config_t vid_200_config[] = { { .description = "" } } }, - { .name = "", .description = "", .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_t vid_200_device = { @@ -1892,7 +1891,7 @@ device_config_t vid_ppc512_config[] = { .default_string = "", .default_int = 0 }, - { .name = "", .description = "", .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_t vid_ppc512_device = { @@ -1930,7 +1929,7 @@ device_config_t vid_pc2086_config[] = { { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_t vid_pc2086_device = { @@ -1968,7 +1967,7 @@ device_config_t vid_pc3086_config[] = { { .description = "" } } }, - { .name = "", .description = "", .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_t vid_pc3086_device = { diff --git a/src/machine/m_at_compaq.c b/src/machine/m_at_compaq.c index 851230bc8..76d54286f 100644 --- a/src/machine/m_at_compaq.c +++ b/src/machine/m_at_compaq.c @@ -716,7 +716,7 @@ const device_config_t compaq_plasma_config[] = { { .description = "" } } }, - { .name = "", .description = "", .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_t compaq_plasma_device = { diff --git a/src/machine/m_europc.c b/src/machine/m_europc.c index 921feda2b..2c035ded1 100644 --- a/src/machine/m_europc.c +++ b/src/machine/m_europc.c @@ -678,10 +678,10 @@ static const device_config_t europc_config[] = { .selection = { { .description = "Disabled (250h)", .value = 0 }, { .description = "Enabled (350h)", .value = 1 }, - { "" } + { .description = "" } }, }, - { .name = "", .description = "", .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; const device_t europc_device = { diff --git a/src/machine/m_pcjr.c b/src/machine/m_pcjr.c index c6b38d572..4836da1bc 100644 --- a/src/machine/m_pcjr.c +++ b/src/machine/m_pcjr.c @@ -784,7 +784,7 @@ static const device_config_t pcjr_config[] = { { .description = "" } } }, - { .name = "", .description = "", .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_t pcjr_device = { diff --git a/src/machine/m_tandy.c b/src/machine/m_tandy.c index 894cae784..39e5fe844 100644 --- a/src/machine/m_tandy.c +++ b/src/machine/m_tandy.c @@ -1157,7 +1157,7 @@ static const device_config_t vid_config[] = { { .description = "" } } }, - { .name = "", .description = "", .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_t vid_device = { diff --git a/src/machine/m_xt_olivetti.c b/src/machine/m_xt_olivetti.c index 9cb6bfc68..a8743cfc5 100644 --- a/src/machine/m_xt_olivetti.c +++ b/src/machine/m_xt_olivetti.c @@ -586,7 +586,6 @@ m19_vid_init(m19_vid_t *vid) device_context_restore(); } - const device_t m24_kbd_device = { .name = "Olivetti M24 keyboard and mouse", .internal_name = "m24_kbd", @@ -616,7 +615,7 @@ const device_config_t m19_vid_config[] = { { .description = "Green Monochrome", .value = 1 }, { .description = "Amber Monochrome", .value = 2 }, { .description = "Gray Monochrome", .value = 3 }, - { .description = "" } + { .description = "" } } }, { @@ -626,7 +625,7 @@ const device_config_t m19_vid_config[] = { .default_string = "", .default_int = 1, }, - { .name = "", .description = "", .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; const device_t m19_vid_device = { diff --git a/src/machine/m_xt_t1000_vid.c b/src/machine/m_xt_t1000_vid.c index b2dcce64d..817b54042 100644 --- a/src/machine/m_xt_t1000_vid.c +++ b/src/machine/m_xt_t1000_vid.c @@ -745,16 +745,9 @@ static const device_config_t t1000_config[] = { .name = "display_language", .description = "Language", .type = CONFIG_SELECTION, - .selection = - { - { - .description = "USA", - .value = 0 - }, - { - .description = "Danish", - .value = 1 - } + .selection = { + { .description = "USA", .value = 0 }, + { .description = "Danish", .value = 1 } }, .default_int = 0 }, @@ -763,7 +756,8 @@ static const device_config_t t1000_config[] = { .description = "Enable backlight", .type = CONFIG_BINARY, .default_string = "", - .default_int = 1 }, + .default_int = 1 + }, { .name = "invert", .description = "Invert colors", @@ -771,7 +765,7 @@ static const device_config_t t1000_config[] = { .default_string = "", .default_int = 0 }, - { .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; const device_t t1000_video_device = { diff --git a/src/machine/m_xt_xi8088.c b/src/machine/m_xt_xi8088.c index ea778a023..ef5d45163 100644 --- a/src/machine/m_xt_xi8088.c +++ b/src/machine/m_xt_xi8088.c @@ -160,7 +160,7 @@ static const device_config_t xi8088_config[] = { .type = CONFIG_BINARY, .default_int = 0 }, - { .type = -1 } + { .name = "", .description = "", .type = CONFIG_END } }; const device_t xi8088_device = { From 036f1ce74b3dcad4a3c7982f1e67ce2825c69414 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 2 Apr 2022 22:23:37 -0400 Subject: [PATCH 26/78] src/video --- src/video/vid_ht216.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/video/vid_ht216.c b/src/video/vid_ht216.c index a2b7fbcb1..a95899d97 100644 --- a/src/video/vid_ht216.c +++ b/src/video/vid_ht216.c @@ -1729,8 +1729,7 @@ const device_t radius_svga_multiview_isa_device = { { .available = radius_svga_multiview_available }, .speed_changed = ht216_speed_changed, .force_redraw = ht216_force_redraw, - radius_svga_multiview_config, - .config = NULL + .config = radius_svga_multiview_config }; const device_t radius_svga_multiview_mca_device = { From d1b274ace24b8386b6fb00d29c74ffcaf1d0ebc6 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 2 Apr 2022 22:23:57 -0400 Subject: [PATCH 27/78] src/network --- src/network/net_3c503.c | 101 ++++++++----- src/network/net_dp8390.c | 1 - src/network/net_ne2000.c | 174 +++++++++++++++------- src/network/net_pcnet.c | 130 +++++++++++------ src/network/net_plip.c | 1 - src/network/net_wd8003.c | 304 +++++++++++++++++++++++++-------------- 6 files changed, 471 insertions(+), 240 deletions(-) diff --git a/src/network/net_3c503.c b/src/network/net_3c503.c index 03d224a4a..bb2ed1628 100644 --- a/src/network/net_3c503.c +++ b/src/network/net_3c503.c @@ -635,59 +635,88 @@ threec503_nic_close(void *priv) free(dev); } - static const device_config_t threec503_config[] = { // clang-format off { - "base", "Address", CONFIG_HEX16, "", 0x300, "", { 0 }, - { - { "0x250", 0x250 }, - { "0x280", 0x280 }, - { "0x2a0", 0x2a0 }, - { "0x2e0", 0x2e0 }, - { "0x300", 0x300 }, - { "0x310", 0x310 }, - { "0x330", 0x330 }, - { "0x350", 0x350 }, - { "", 0 } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x300, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "0x250", .value = 0x250 }, + { .description = "0x280", .value = 0x280 }, + { .description = "0x2a0", .value = 0x2a0 }, + { .description = "0x2e0", .value = 0x2e0 }, + { .description = "0x300", .value = 0x300 }, + { .description = "0x310", .value = 0x310 }, + { .description = "0x330", .value = 0x330 }, + { .description = "0x350", .value = 0x350 }, + { .description = "", .value = 0 } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 4", 4 }, - { "IRQ 5", 5 }, - { "", 0 } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 3, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 2", .value = 2 }, + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 4", .value = 4 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "", .value = 0 } }, }, { - "dma", "DMA", CONFIG_SELECTION, "", 3, "", { 0 }, - { - { "DMA 1", 1 }, - { "DMA 2", 2 }, - { "DMA 3", 3 }, - { "", 0 } + .name = "dma", + .description = "DMA", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 3, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "DMA 1", .value = 1 }, + { .description = "DMA 2", .value = 2 }, + { .description = "DMA 3", .value = 3 }, + { .description = "", .value = 0 } }, }, { - "mac", "MAC Address", CONFIG_MAC, "", -1, "", { 0 }, - { - { "", 0 } + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "", .value = 0 } }, }, { - "bios_addr", "BIOS address", CONFIG_HEX20, "", 0xCC000, "", { 0 }, - { - { "DC00", 0xDC000 }, - { "D800", 0xD8000 }, - { "C800", 0xC8000 }, - { "CC00", 0xCC000 }, - { "", 0 } + .name = "bios_addr", + .description = "BIOS address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xCC000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "DC00", .value = 0xDC000 }, + { .description = "D800", .value = 0xD8000 }, + { .description = "C800", .value = 0xC8000 }, + { .description = "CC00", .value = 0xCC000 }, + { .description = "", .value = 0 } }, }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format off }; diff --git a/src/network/net_dp8390.c b/src/network/net_dp8390.c index 7dfcf8c34..819412454 100644 --- a/src/network/net_dp8390.c +++ b/src/network/net_dp8390.c @@ -1110,7 +1110,6 @@ dp8390_close(void *priv) } } - const device_t dp8390_device = { .name = "DP8390 Network Interface Controller", .internal_name = "dp8390", diff --git a/src/network/net_ne2000.c b/src/network/net_ne2000.c index 1161a5a9c..5c0a7ba61 100644 --- a/src/network/net_ne2000.c +++ b/src/network/net_ne2000.c @@ -1142,86 +1142,152 @@ nic_close(void *priv) // clang-format off static const device_config_t ne1000_config[] = { { - "base", "Address", CONFIG_HEX16, "", 0x300, "", { 0 }, - { - { "0x280", 0x280 }, - { "0x300", 0x300 }, - { "0x320", 0x320 }, - { "0x340", 0x340 }, - { "0x360", 0x360 }, - { "0x380", 0x380 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x300, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "0x280", .value = 0x280 }, + { .description = "0x300", .value = 0x300 }, + { .description = "0x320", .value = 0x320 }, + { .description = "0x340", .value = 0x340 }, + { .description = "0x360", .value = 0x360 }, + { .description = "0x380", .value = 0x380 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "IRQ 10", 10 }, - { "IRQ 11", 11 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 3, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 2", .value = 2 }, + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 7", .value = 7 }, + { .description = "IRQ 10", .value = 10 }, + { .description = "IRQ 11", .value = 11 }, + { .description = "" } }, }, - { "mac", "MAC Address", CONFIG_MAC, "", -1 }, - { "", "", -1 } + { + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t ne2000_config[] = { { - "base", "Address", CONFIG_HEX16, "", 0x300, "", { 0 }, - { - { "0x280", 0x280 }, - { "0x300", 0x300 }, - { "0x320", 0x320 }, - { "0x340", 0x340 }, - { "0x360", 0x360 }, - { "0x380", 0x380 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x300, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "0x280", .value = 0x280 }, + { .description = "0x300", .value = 0x300 }, + { .description = "0x320", .value = 0x320 }, + { .description = "0x340", .value = 0x340 }, + { .description = "0x360", .value = 0x360 }, + { .description = "0x380", .value = 0x380 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 10, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "IRQ 10", 10 }, - { "IRQ 11", 11 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 10, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 2", .value = 2 }, + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 7", .value = 7 }, + { .description = "IRQ 10", .value = 10 }, + { .description = "IRQ 11", .value = 11 }, + { .description = "" } }, }, - { "mac", "MAC Address", CONFIG_MAC, "", -1 }, { - "bios_addr", "BIOS address", CONFIG_HEX20, "", 0, "", { 0 }, - { - { "Disabled", 0x00000 }, - { "D000", 0xD0000 }, - { "D800", 0xD8000 }, - { "C800", 0xC8000 }, - { "" } + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1 + }, + { + .name = "bios_addr", + .description = "BIOS address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0x00000 }, + { .description = "D000", .value = 0xD0000 }, + { .description = "D800", .value = 0xD8000 }, + { .description = "C800", .value = 0xC8000 }, + { .description = "" } }, }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t rtl8019as_config[] = { - { "mac", "MAC Address", CONFIG_MAC, "", -1 }, - { "", "", -1 } + { + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t rtl8029as_config[] = { - { "bios", "Enable BIOS", CONFIG_BINARY, "", 0 }, - { "mac", "MAC Address", CONFIG_MAC, "", -1 }, - { "", "", -1 } + { + .name = "bios", + .description = "Enable BIOS", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t mca_mac_config[] = { - { "mac", "MAC Address", CONFIG_MAC, "", -1 }, - { "", "", -1 } + { + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; // clang-format on diff --git a/src/network/net_pcnet.c b/src/network/net_pcnet.c index 6dd22315d..047624dad 100644 --- a/src/network/net_pcnet.c +++ b/src/network/net_pcnet.c @@ -3078,68 +3078,116 @@ pcnet_close(void *priv) // clang-format off static const device_config_t pcnet_pci_config[] = { - { "mac", "MAC Address", CONFIG_MAC, "", -1 }, - { "", "", -1 } + { + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t pcnet_isa_config[] = { { - "base", "Address", CONFIG_HEX16, "", 0x300, "", { 0 }, - { - { "0x300", 0x300 }, - { "0x320", 0x320 }, - { "0x340", 0x340 }, - { "0x360", 0x360 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x300, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "0x300", .value = 0x300 }, + { .description = "0x320", .value = 0x320 }, + { .description = "0x340", .value = 0x340 }, + { .description = "0x360", .value = 0x360 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 }, - { - { "IRQ 3", 3 }, - { "IRQ 4", 4 }, - { "IRQ 5", 5 }, - { "IRQ 9", 9 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 3, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 4", .value = 4 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 9", .value = 9 }, + { .description = "" } }, }, { - "dma", "DMA channel", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "DMA 3", 3 }, - { "DMA 5", 5 }, - { "DMA 6", 6 }, - { "DMA 7", 7 }, - { "" } + .name = "dma", + .description = "DMA channel", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "DMA 3", .value = 3 }, + { .description = "DMA 5", .value = 5 }, + { .description = "DMA 6", .value = 6 }, + { .description = "DMA 7", .value = 7 }, + { .description = "" } }, }, - { "mac", "MAC Address", CONFIG_MAC, "", -1 }, - { "", "", -1 } + { + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t pcnet_vlb_config[] = { { - "base", "Address", CONFIG_HEX16, "", 0x300, "", { 0 }, - { - { "0x300", 0x300 }, - { "0x320", 0x320 }, - { "0x340", 0x340 }, - { "0x360", 0x360 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x300, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "0x300", .value = 0x300 }, + { .description = "0x320", .value = 0x320 }, + { .description = "0x340", .value = 0x340 }, + { .description = "0x360", .value = 0x360 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 }, - { - { "IRQ 3", 3 }, - { "IRQ 4", 4 }, - { "IRQ 5", 5 }, - { "IRQ 9", 9 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 3, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 4", .value = 4 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 9", .value = 9 }, + { .description = "" } }, }, - { "mac", "MAC Address", CONFIG_MAC, "", -1 }, - { "", "", -1 } + { + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; // clang-format on diff --git a/src/network/net_plip.c b/src/network/net_plip.c index e8e7df008..6da355632 100644 --- a/src/network/net_plip.c +++ b/src/network/net_plip.c @@ -490,7 +490,6 @@ plip_close(void *priv) free(priv); } - const lpt_device_t lpt_plip_device = { .name = "Parallel Line Internet Protocol", .internal_name = "plip", diff --git a/src/network/net_wd8003.c b/src/network/net_wd8003.c index be6c46905..81e6d91ec 100644 --- a/src/network/net_wd8003.c +++ b/src/network/net_wd8003.c @@ -738,156 +738,246 @@ wd_close(void *priv) // clang-format off static const device_config_t wd8003_config[] = { { - "base", "Address", CONFIG_HEX16, "", 0x300, "", { 0 }, - { - { "0x240", 0x240 }, - { "0x280", 0x280 }, - { "0x300", 0x300 }, - { "0x380", 0x380 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x300, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "0x240", .value = 0x240 }, + { .description = "0x280", .value = 0x280 }, + { .description = "0x300", .value = 0x300 }, + { .description = "0x380", .value = 0x380 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 3, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 2", .value = 2 }, + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 7", .value = 7 }, + { .description = "" } }, }, { - "ram_addr", "RAM address", CONFIG_HEX20, "", 0xD0000, "", { 0 }, - { - { "C800", 0xC8000 }, - { "CC00", 0xCC000 }, - { "D000", 0xD0000 }, - { "D400", 0xD4000 }, - { "D800", 0xD8000 }, - { "DC00", 0xDC000 }, - { "" } + .name = "ram_addr", + .description = "RAM address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xD0000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "C800", .value = 0xC8000 }, + { .description = "CC00", .value = 0xCC000 }, + { .description = "D000", .value = 0xD0000 }, + { .description = "D400", .value = 0xD4000 }, + { .description = "D800", .value = 0xD8000 }, + { .description = "DC00", .value = 0xDC000 }, + { .description = "" } }, }, - { "mac", "MAC Address", CONFIG_MAC, "", -1 }, - { "", "", -1 } + { + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t wd8003eb_config[] = { { - "base", "Address", CONFIG_HEX16, "", 0x280, "", { 0 }, - { - { "0x200", 0x200 }, - { "0x220", 0x220 }, - { "0x240", 0x240 }, - { "0x260", 0x260 }, - { "0x280", 0x280 }, - { "0x2A0", 0x2A0 }, - { "0x2C0", 0x2C0 }, - { "0x300", 0x300 }, - { "0x340", 0x340 }, - { "0x380", 0x380 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x280, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "0x200", .value = 0x200 }, + { .description = "0x220", .value = 0x220 }, + { .description = "0x240", .value = 0x240 }, + { .description = "0x260", .value = 0x260 }, + { .description = "0x280", .value = 0x280 }, + { .description = "0x2A0", .value = 0x2A0 }, + { .description = "0x2C0", .value = 0x2C0 }, + { .description = "0x300", .value = 0x300 }, + { .description = "0x340", .value = 0x340 }, + { .description = "0x380", .value = 0x380 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 }, - { - { "IRQ 2/9", 9 }, - { "IRQ 3", 3 }, - { "IRQ 4", 4 }, - { "IRQ 7", 7 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 3, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 2/9", .value = 9 }, + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 4", .value = 4 }, + { .description = "IRQ 7", .value = 7 }, + { .description = "" } }, }, { - "ram_addr", "RAM address", CONFIG_HEX20, "", 0xD0000, "", { 0 }, - { - { "C000", 0xC0000 }, - { "C400", 0xC4000 }, - { "C800", 0xC8000 }, - { "CC00", 0xCC000 }, - { "D000", 0xD0000 }, - { "D400", 0xD4000 }, - { "D800", 0xD8000 }, - { "DC00", 0xDC000 }, - { "" } + .name = "ram_addr", + .description = "RAM address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xD0000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "C000", .value = 0xC0000 }, + { .description = "C400", .value = 0xC4000 }, + { .description = "C800", .value = 0xC8000 }, + { .description = "CC00", .value = 0xCC000 }, + { .description = "D000", .value = 0xD0000 }, + { .description = "D400", .value = 0xD4000 }, + { .description = "D800", .value = 0xD8000 }, + { .description = "DC00", .value = 0xDC000 }, + { .description = "" } }, }, { - "ram_size", "RAM size", CONFIG_SELECTION, "", 8192, "", { 0 }, - { - { "8 kB", 8192 }, - { "32 kB", 32768 }, - { "" } + .name = "ram_size", + .description = "RAM size", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 8192, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "8 kB", .value = 8192 }, + { .description = "32 kB", .value = 32768 }, + { .description = "" } }, }, - { "mac", "MAC Address", CONFIG_MAC, "", -1 }, - { "", "", -1 } + { + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; /* WD8013EBT configuration and defaults set according to this site: http://www.stack.nl/~marcolz/network/wd80x3.html#WD8013EBT */ static const device_config_t wd8013_config[] = { { - "base", "Address", CONFIG_HEX16, "", 0x280, "", { 0 }, - { - { "0x200", 0x200 }, - { "0x220", 0x220 }, - { "0x240", 0x240 }, - { "0x260", 0x260 }, - { "0x280", 0x280 }, - { "0x2A0", 0x2A0 }, - { "0x2C0", 0x2C0 }, - { "0x300", 0x300 }, - { "0x340", 0x340 }, - { "0x380", 0x380 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x280, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "0x200", .value = 0x200 }, + { .description = "0x220", .value = 0x220 }, + { .description = "0x240", .value = 0x240 }, + { .description = "0x260", .value = 0x260 }, + { .description = "0x280", .value = 0x280 }, + { .description = "0x2A0", .value = 0x2A0 }, + { .description = "0x2C0", .value = 0x2C0 }, + { .description = "0x300", .value = 0x300 }, + { .description = "0x340", .value = 0x340 }, + { .description = "0x380", .value = 0x380 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 3, "", { 0 }, - { - { "IRQ 2/9", 9 }, - { "IRQ 3", 3 }, - { "IRQ 4", 4 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "IRQ 10", 10 }, - { "IRQ 11", 11 }, - { "IRQ 15", 15 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 3, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 2/9", .value = 9 }, + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 4", .value = 4 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 7", .value = 7 }, + { .description = "IRQ 10", .value = 10 }, + { .description = "IRQ 11", .value = 11 }, + { .description = "IRQ 15", .value = 15 }, + { .description = "" } }, }, { - "ram_addr", "RAM address", CONFIG_HEX20, "", 0xD0000, "", { 0 }, - { - { "C000", 0xC0000 }, - { "C400", 0xC4000 }, - { "C800", 0xC8000 }, - { "CC00", 0xCC000 }, - { "D000", 0xD0000 }, - { "D400", 0xD4000 }, - { "D800", 0xD8000 }, - { "DC00", 0xDC000 }, - { "" } + .name = "ram_addr", + .description = "RAM address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xD0000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "C000", .value = 0xC0000 }, + { .description = "C400", .value = 0xC4000 }, + { .description = "C800", .value = 0xC8000 }, + { .description = "CC00", .value = 0xCC000 }, + { .description = "D000", .value = 0xD0000 }, + { .description = "D400", .value = 0xD4000 }, + { .description = "D800", .value = 0xD8000 }, + { .description = "DC00", .value = 0xDC000 }, + { .description = "" } }, }, { - "ram_size", "RAM size", CONFIG_SELECTION, "", 16384, "", { 0 }, - { - { "16 kB", 16384 }, - { "64 kB", 65536 }, - { "" } + .name = "ram_size", + .description = "RAM size", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 16384, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "16 kB", .value = 16384 }, + { .description = "64 kB", .value = 65536 }, + { .description = "" } }, }, - { "mac", "MAC Address", CONFIG_MAC, "", -1 }, - { "", "", -1 } + { + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t mca_mac_config[] = { - { "mac", "MAC Address", CONFIG_MAC, "", -1 }, - { "", "", -1 } + { + .name = "mac", + .description = "MAC Address", + .type = CONFIG_MAC, + .default_string = "", + .default_int = -1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; // clang-format on From 0cf7bd5eb04e03656876fbd3763ceb8fdb5cb467 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sun, 3 Apr 2022 02:08:21 -0400 Subject: [PATCH 28/78] src/scsi --- src/scsi/scsi_aha154x.c | 333 +++++++++++++++++++++++--------------- src/scsi/scsi_buslogic.c | 98 +++++++---- src/scsi/scsi_ncr5380.c | 204 +++++++++++++++-------- src/scsi/scsi_ncr53c8xx.c | 20 ++- src/scsi/scsi_pcscsi.c | 10 +- src/scsi/scsi_spock.c | 18 ++- 6 files changed, 434 insertions(+), 249 deletions(-) diff --git a/src/scsi/scsi_aha154x.c b/src/scsi/scsi_aha154x.c index 9fac11764..cdf1f1a56 100644 --- a/src/scsi/scsi_aha154x.c +++ b/src/scsi/scsi_aha154x.c @@ -1141,181 +1141,258 @@ aha_init(const device_t *info) // clang-format off static const device_config_t aha_154xb_config[] = { { - "base", "Address", CONFIG_HEX16, "", 0x334, "", { 0 }, - { - { "None", 0 }, - { "0x330", 0x330 }, - { "0x334", 0x334 }, - { "0x230", 0x230 }, - { "0x234", 0x234 }, - { "0x130", 0x130 }, - { "0x134", 0x134 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x334, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "None", .value = 0 }, + { .description = "0x330", .value = 0x330 }, + { .description = "0x334", .value = 0x334 }, + { .description = "0x230", .value = 0x230 }, + { .description = "0x234", .value = 0x234 }, + { .description = "0x130", .value = 0x130 }, + { .description = "0x134", .value = 0x134 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 11, "", { 0 }, - { - { "IRQ 9", 9 }, - { "IRQ 10", 10 }, - { "IRQ 11", 11 }, - { "IRQ 12", 12 }, - { "IRQ 14", 14 }, - { "IRQ 15", 15 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 11, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 9", .value = 9 }, + { .description = "IRQ 10", .value = 10 }, + { .description = "IRQ 11", .value = 11 }, + { .description = "IRQ 12", .value = 12 }, + { .description = "IRQ 14", .value = 14 }, + { .description = "IRQ 15", .value = 15 }, + { .description = "" } }, }, { - "dma", "DMA channel", CONFIG_SELECTION, "", 6, "", { 0 }, - { - { "DMA 5", 5 }, - { "DMA 6", 6 }, - { "DMA 7", 7 }, - { "" } + .name = "dma", + .description = "DMA channel", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 6, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "DMA 5", .value = 5 }, + { .description = "DMA 6", .value = 6 }, + { .description = "DMA 7", .value = 7 }, + { .description = "" } }, }, { - "hostid", "Host ID", CONFIG_SELECTION, "", 7, "", { 0 }, - { - { "0", 0 }, - { "1", 1 }, - { "2", 2 }, - { "3", 3 }, - { "4", 4 }, - { "5", 5 }, - { "6", 6 }, - { "7", 7 }, - { "" } + .name = "hostid", + .description = "Host ID", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 7, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "0", .value = 0 }, + { .description = "1", .value = 1 }, + { .description = "2", .value = 2 }, + { .description = "3", .value = 3 }, + { .description = "4", .value = 4 }, + { .description = "5", .value = 5 }, + { .description = "6", .value = 6 }, + { .description = "7", .value = 7 }, + { .description = "" } }, }, { - "bios_addr", "BIOS Address", CONFIG_HEX20, "", 0, "", { 0 }, - { - { "Disabled", 0 }, - { "C800H", 0xc8000 }, - { "D000H", 0xd0000 }, - { "D800H", 0xd8000 }, - { "DC00H", 0xdc000 }, - { "" } + .name = "bios_addr", + .description = "BIOS Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0 }, + { .description = "C800H", .value = 0xc8000 }, + { .description = "D000H", .value = 0xd0000 }, + { .description = "D800H", .value = 0xd8000 }, + { .description = "DC00H", .value = 0xdc000 }, + { .description = "" } }, }, - { - "", "", -1 - } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t aha_154x_config[] = { { - "base", "Address", CONFIG_HEX16, "", 0x334, "", { 0 }, - { - { "None", 0 }, - { "0x330", 0x330 }, - { "0x334", 0x334 }, - { "0x230", 0x230 }, - { "0x234", 0x234 }, - { "0x130", 0x130 }, - { "0x134", 0x134 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x334, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "None", .value = 0 }, + { .description = "0x330", .value = 0x330 }, + { .description = "0x334", .value = 0x334 }, + { .description = "0x230", .value = 0x230 }, + { .description = "0x234", .value = 0x234 }, + { .description = "0x130", .value = 0x130 }, + { .description = "0x134", .value = 0x134 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 11, "", { 0 }, - { - { "IRQ 9", 9 }, - { "IRQ 10", 10 }, - { "IRQ 11", 11 }, - { "IRQ 12", 12 }, - { "IRQ 14", 14 }, - { "IRQ 15", 15 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 11, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 9", .value = 9 }, + { .description = "IRQ 10", .value = 10 }, + { .description = "IRQ 11", .value = 11 }, + { .description = "IRQ 12", .value = 12 }, + { .description = "IRQ 14", .value = 14 }, + { .description = "IRQ 15", .value = 15 }, + { .description = "" } }, }, { - "dma", "DMA channel", CONFIG_SELECTION, "", 6, "", { 0 }, - { - { "DMA 5", 5 }, - { "DMA 6", 6 }, - { "DMA 7", 7 }, - { "" } + .name = "dma", + .description = "DMA channel", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 6, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "DMA 5", .value = 5 }, + { .description = "DMA 6", .value = 6 }, + { .description = "DMA 7", .value = 7 }, + { .description = "" } }, }, { - "bios_addr", "BIOS Address", CONFIG_HEX20, "", 0, "", { 0 }, - { - { "Disabled", 0 }, - { "C800H", 0xc8000 }, - { "D000H", 0xd0000 }, - { "D800H", 0xd8000 }, - { "DC00H", 0xdc000 }, - { "" } + .name = "bios_addr", + .description = "BIOS Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0 }, + { .description = "C800H", .value = 0xc8000 }, + { .description = "D000H", .value = 0xd0000 }, + { .description = "D800H", .value = 0xd8000 }, + { .description = "DC00H", .value = 0xdc000 }, + { .description = "" } }, }, - { - "", "", -1 - } + { .name = "", .description = "", .type = CONFIG_END } }; - static const device_config_t aha_154xcf_config[] = { { - "base", "Address", CONFIG_HEX16, "", 0x334, "", { 0 }, - { - { "None", 0 }, - { "0x330", 0x330 }, - { "0x334", 0x334 }, - { "0x230", 0x230 }, - { "0x234", 0x234 }, - { "0x130", 0x130 }, - { "0x134", 0x134 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x334, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "None", .value = 0 }, + { .description = "0x330", .value = 0x330 }, + { .description = "0x334", .value = 0x334 }, + { .description = "0x230", .value = 0x230 }, + { .description = "0x234", .value = 0x234 }, + { .description = "0x130", .value = 0x130 }, + { .description = "0x134", .value = 0x134 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 11, "", { 0 }, - { - { "IRQ 9", 9 }, - { "IRQ 10", 10 }, - { "IRQ 11", 11 }, - { "IRQ 12", 12 }, - { "IRQ 14", 14 }, - { "IRQ 15", 15 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 11, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 9", .value = 9 }, + { .description = "IRQ 10", .value = 10 }, + { .description = "IRQ 11", .value = 11 }, + { .description = "IRQ 12", .value = 12 }, + { .description = "IRQ 14", .value = 14 }, + { .description = "IRQ 15", .value = 15 }, + { .description = "" } }, }, { - "dma", "DMA channel", CONFIG_SELECTION, "", 6, "", { 0 }, - { - { "DMA 5", 5 }, - { "DMA 6", 6 }, - { "DMA 7", 7 }, - { "" } + .name = "dma", + .description = "DMA channel", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 6, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "DMA 5", .value = 5 }, + { .description = "DMA 6", .value = 6 }, + { .description = "DMA 7", .value = 7 }, + { .description = "" } }, }, { - "bios_addr", "BIOS Address", CONFIG_HEX20, "", 0, "", { 0 }, - { - { "Disabled", 0 }, - { "C800H", 0xc8000 }, - { "CC00H", 0xcc000 }, - { "D000H", 0xd0000 }, - { "D400H", 0xd4000 }, - { "D800H", 0xd8000 }, - { "DC00H", 0xdc000 }, - { "" } + .name = "bios_addr", + .description = "BIOS Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0 }, + { .description = "C800H", .value = 0xc8000 }, + { .description = "CC00H", .value = 0xcc000 }, + { .description = "D000H", .value = 0xd0000 }, + { .description = "D400H", .value = 0xd4000 }, + { .description = "D800H", .value = 0xd8000 }, + { .description = "DC00H", .value = 0xdc000 }, + { .description = "" } }, }, { - "fdc_addr", "FDC address", CONFIG_HEX16, "", 0, "", { 0 }, - { - { "None", 0 }, - { "0x3f0", FDC_PRIMARY_ADDR }, - { "0x370", FDC_SECONDARY_ADDR }, - { "" } + .name = "fdc_addr", + .description = "FDC address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "None", .value = 0 }, + { .description = "0x3f0", .value = FDC_PRIMARY_ADDR }, + { .description = "0x370", .value = FDC_SECONDARY_ADDR }, + { .description = "" } }, }, - { - "", "", -1 - } + { .name = "", .description = "", .type = CONFIG_END } }; // clang-format on diff --git a/src/scsi/scsi_buslogic.c b/src/scsi/scsi_buslogic.c index 79a019821..e8c4dde57 100644 --- a/src/scsi/scsi_buslogic.c +++ b/src/scsi/scsi_buslogic.c @@ -1805,54 +1805,84 @@ buslogic_init(const device_t *info) // clang-format off static const device_config_t BT_ISA_Config[] = { { - "base", "Address", CONFIG_HEX16, "", 0x334, "", { 0 }, - { - { "0x330", 0x330 }, - { "0x334", 0x334 }, - { "0x230", 0x230 }, - { "0x234", 0x234 }, - { "0x130", 0x130 }, - { "0x134", 0x134 }, - { "", 0 } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x334, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "0x330", .value = 0x330 }, + { .description = "0x334", .value = 0x334 }, + { .description = "0x230", .value = 0x230 }, + { .description = "0x234", .value = 0x234 }, + { .description = "0x130", .value = 0x130 }, + { .description = "0x134", .value = 0x134 }, + { .description = "", .value = 0 } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 11, "", { 0 }, - { - { "IRQ 9", 9 }, - { "IRQ 10", 10 }, - { "IRQ 11", 11 }, - { "IRQ 12", 12 }, - { "IRQ 14", 14 }, - { "IRQ 15", 15 }, - { "", 0 } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 11, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 9", .value = 9 }, + { .description = "IRQ 10", .value = 10 }, + { .description = "IRQ 11", .value = 11 }, + { .description = "IRQ 12", .value = 12 }, + { .description = "IRQ 14", .value = 14 }, + { .description = "IRQ 15", .value = 15 }, + { .description = "", 0 } }, }, { - "dma", "DMA channel", CONFIG_SELECTION, "", 6, "", { 0 }, - { - { "DMA 5", 5 }, - { "DMA 6", 6 }, - { "DMA 7", 7 }, - { "", 0 } + .name = "dma", + .description = "DMA channel", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 6, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "DMA 5", .value = 5 }, + { .description = "DMA 6", .value = 6 }, + { .description = "DMA 7", .value = 7 }, + { .description = "", .value = 0 } }, }, { - "bios_addr", "BIOS Address", CONFIG_HEX20, "", 0, "", { 0 }, - { - { "Disabled", 0 }, - { "C800H", 0xc8000 }, - { "D000H", 0xd0000 }, - { "D800H", 0xd8000 }, - { "", 0 } + .name = "bios_addr", + .description = "BIOS Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0 }, + { .description = "C800H", .value = 0xc8000 }, + { .description = "D000H", .value = 0xd0000 }, + { .description = "D800H", .value = 0xd8000 }, + { .description = "", .value = 0 } }, }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t BT958D_Config[] = { - { "bios", "Enable BIOS", CONFIG_BINARY, "", 0 }, - { "", "", -1 } + { + .name = "bios", + .description = "Enable BIOS", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } }; // clang-format on diff --git a/src/scsi/scsi_ncr5380.c b/src/scsi/scsi_ncr5380.c index 1fa91f8c7..1b05b1a88 100644 --- a/src/scsi/scsi_ncr5380.c +++ b/src/scsi/scsi_ncr5380.c @@ -1594,116 +1594,180 @@ corel_ls2000_available(void) // clang-format off static const device_config_t ncr5380_mmio_config[] = { { - "bios_addr", "BIOS Address", CONFIG_HEX20, "", 0xD8000, "", { 0 }, - { - { "C800H", 0xc8000 }, - { "CC00H", 0xcc000 }, - { "D800H", 0xd8000 }, - { "DC00H", 0xdc000 }, - { "" } + .name = "bios_addr", + .description = "BIOS Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xD8000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "C800H", .value = 0xc8000 }, + { .description = "CC00H", .value = 0xcc000 }, + { .description = "D800H", .value = 0xd8000 }, + { .description = "DC00H", .value = 0xdc000 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "IRQ 3", 3 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 7", .value = 7 }, + { .description = "" } }, }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t rancho_config[] = { { - "bios_addr", "BIOS Address", CONFIG_HEX20, "", 0xD8000, "", { 0 }, - { - { "C800H", 0xc8000 }, - { "CC00H", 0xcc000 }, - { "D800H", 0xd8000 }, - { "DC00H", 0xdc000 }, - { "" } + .name = "bios_addr", + .description = "BIOS Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xD8000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "C800H", .value = 0xc8000 }, + { .description = "CC00H", .value = 0xcc000 }, + { .description = "D800H", .value = 0xd8000 }, + { .description = "DC00H", .value = 0xdc000 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "IRQ 3", 3 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 7", .value = 7 }, + { .description = "" } }, }, { - "bios_ver", "BIOS Version", CONFIG_SELECTION, "", 1, "", { 0 }, - { - { "8.20R", 1 }, - { "8.10R", 0 }, - { "" } + .name = "bios_ver", + .description = "BIOS Version", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 1, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "8.20R", .value = 1 }, + { .description = "8.10R", .value = 0 }, + { .description = "" } }, }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t t130b_config[] = { { - "bios_addr", "BIOS Address", CONFIG_HEX20, "", 0xD8000, "", { 0 }, - { - { "Disabled", 0 }, - { "C800H", 0xc8000 }, - { "CC00H", 0xcc000 }, - { "D800H", 0xd8000 }, - { "DC00H", 0xdc000 }, - { "" } + .name = "bios_addr", + .description = "BIOS Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xD8000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0 }, + { .description = "C800H", .value = 0xc8000 }, + { .description = "CC00H", .value = 0xcc000 }, + { .description = "D800H", .value = 0xd8000 }, + { .description = "DC00H", .value = 0xdc000 }, + { .description = "" } }, }, { - "base", "Address", CONFIG_HEX16, "", 0x0350, "", { 0 }, - { - { "240H", 0x0240 }, - { "250H", 0x0250 }, - { "340H", 0x0340 }, - { "350H", 0x0350 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x0350, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "240H", .value = 0x0240 }, + { .description = "250H", .value = 0x0250 }, + { .description = "340H", .value = 0x0340 }, + { .description = "350H", .value = 0x0350 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "IRQ 3", 3 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 7", .value = 7 }, + { .description = "" } }, }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t t128_config[] = { { - "bios_addr", "BIOS Address", CONFIG_HEX20, "", 0xD8000, "", { 0 }, - { - { "C800H", 0xc8000 }, - { "CC00H", 0xcc000 }, - { "D800H", 0xd8000 }, - { "DC00H", 0xdc000 }, - { "" } + .name = "bios_addr", + .description = "BIOS Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xD8000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "C800H", .value = 0xc8000 }, + { .description = "CC00H", .value = 0xcc000 }, + { .description = "D800H", .value = 0xd8000 }, + { .description = "DC00H", .value = 0xdc000 }, + { .description = "" } }, }, { - "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "IRQ 3", 3 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "" } + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner ={ 0 }, + .selection = { + { .description = "IRQ 3", .value = 3 }, + { .description = "IRQ 5", .value = 5 }, + { .description = "IRQ 7", .value = 7 }, + { .description = "" } }, }, { - "boot", "Enable Boot ROM", CONFIG_BINARY, "", 1 + .name = "boot", + .description = "Enable Boot ROM", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } }; // clang-format on diff --git a/src/scsi/scsi_ncr53c8xx.c b/src/scsi/scsi_ncr53c8xx.c index f438a342c..999948648 100644 --- a/src/scsi/scsi_ncr53c8xx.c +++ b/src/scsi/scsi_ncr53c8xx.c @@ -2636,15 +2636,21 @@ ncr53c8xx_close(void *priv) static const device_config_t ncr53c8xx_pci_config[] = { // clang-format off { - "bios", "BIOS", CONFIG_SELECTION, "", 1, "", { 0 }, - { - { "SDMS 4.x BIOS", 2 }, - { "SDMS 3.x BIOS", 1 }, - { "Disable BIOS", 0 }, - { "" } + .name = "bios", + .description = "BIOS", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 1, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "SDMS 4.x BIOS", .value = 2 }, + { .description = "SDMS 3.x BIOS", .value = 1 }, + { .description = "Disable BIOS", .value = 0 }, + { .description = "" } }, }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/scsi/scsi_pcscsi.c b/src/scsi/scsi_pcscsi.c index 74011b21b..57fcc2469 100644 --- a/src/scsi/scsi_pcscsi.c +++ b/src/scsi/scsi_pcscsi.c @@ -2002,11 +2002,13 @@ esp_close(void *priv) static const device_config_t bios_enable_config[] = { // clang-format off { - "bios", "Enable BIOS", CONFIG_BINARY, "", 0 + .name = "bios", + .description = "Enable BIOS", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 }, - { - "", "", -1 - } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/scsi/scsi_spock.c b/src/scsi/scsi_spock.c index f00782983..8b5bde94a 100644 --- a/src/scsi/scsi_spock.c +++ b/src/scsi/scsi_spock.c @@ -1159,14 +1159,20 @@ spock_available(void) static const device_config_t spock_rom_config[] = { // clang-format off { - "bios_ver", "BIOS Version", CONFIG_SELECTION, "", 1, "", { 0 }, - { - { "1991 BIOS (>1GB)", 1 }, - { "1990 BIOS", 0 }, - { "" } + .name = "bios_ver", + .description = "BIOS Version", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 1, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "1991 BIOS (>1GB)", .value = 1 }, + { .description = "1990 BIOS", .value = 0 }, + { .description = "" } }, }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; From 3431e01d4ac991584e9201489ee11c1aa3a75583 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Fri, 8 Apr 2022 21:41:33 -0400 Subject: [PATCH 29/78] src/sound --- src/sound/midi_fluidsynth.c | 4 +- src/sound/midi_mt32.c | 4 +- src/sound/midi_rtmidi.cpp | 84 ++- src/sound/snd_adlibgold.c | 26 +- src/sound/snd_audiopci.c | 68 +- src/sound/snd_azt2316a.c | 119 +++- src/sound/snd_cmi8x38.c | 28 +- src/sound/snd_cms.c | 48 +- src/sound/snd_gus.c | 99 ++- src/sound/snd_mpu401.c | 105 ++- src/sound/snd_pssj.c | 31 +- src/sound/snd_sb.c | 1340 ++++++++++++++++++++++++++++------- src/sound/snd_sn76489.c | 29 +- src/sound/snd_ssi2001.c | 33 +- src/sound/snd_wss.c | 43 +- 15 files changed, 1597 insertions(+), 464 deletions(-) diff --git a/src/sound/midi_fluidsynth.c b/src/sound/midi_fluidsynth.c index 1af4bb2c1..7f3d39383 100644 --- a/src/sound/midi_fluidsynth.c +++ b/src/sound/midi_fluidsynth.c @@ -541,9 +541,7 @@ static const device_config_t fluidsynth_config[] = { }, .default_int = 2 }, - { - .type = -1 - } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/sound/midi_mt32.c b/src/sound/midi_mt32.c index 5b19aa018..87255e319 100644 --- a/src/sound/midi_mt32.c +++ b/src/sound/midi_mt32.c @@ -368,9 +368,7 @@ static const device_config_t mt32_config[] = { .type = CONFIG_BINARY, .default_int = 1 }, - { - .type = -1 - } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/sound/midi_rtmidi.cpp b/src/sound/midi_rtmidi.cpp index 5eaf5a964..43f0695ee 100644 --- a/src/sound/midi_rtmidi.cpp +++ b/src/sound/midi_rtmidi.cpp @@ -234,57 +234,73 @@ rtmidi_in_get_dev_name(int num, char *s) static const device_config_t system_midi_config[] = { { - "midi", "MIDI out device", CONFIG_MIDI_OUT, "", 0 + .name = "midi", + .description = "MIDI out device", + .type = CONFIG_MIDI_OUT, + .default_string = "", + .default_int = 0 }, - { - "", "", -1 - } + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t midi_input_config[] = { { - "midi_input", "MIDI in device", CONFIG_MIDI_IN, "", 0 + .name = "midi_input", + .description = "MIDI in device", + .type = CONFIG_MIDI_IN, + .default_string = "", + .default_int = 0 }, { - "realtime", "MIDI Real time", CONFIG_BINARY, "", 0 + .name = "realtime", + .description = "MIDI Real time", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 }, { - "thruchan", "MIDI Thru", CONFIG_BINARY, "", 1 + .name = "thruchan", + .description = "MIDI Thru", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 }, { - "clockout", "MIDI Clockout", CONFIG_BINARY, "", 1 + .name = "clockout", + .description = "MIDI Clockout", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 }, - { - "", "", -1 - } + { .name = "", .description = "", .type = CONFIG_END } }; const device_t rtmidi_output_device = { - SYSTEM_MIDI_NAME, - SYSTEM_MIDI_INTERNAL_NAME, - 0, 0, - rtmidi_output_init, - rtmidi_output_close, - NULL, - { rtmidi_out_get_num_devs }, - NULL, - NULL, - system_midi_config + .name = SYSTEM_MIDI_NAME, + .internal_name = SYSTEM_MIDI_INTERNAL_NAME, + .flags = 0, + .local = 0, + .init = rtmidi_output_init, + .close = rtmidi_output_close, + .reset = NULL, + { .available = rtmidi_out_get_num_devs }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = system_midi_config }; - -const device_t rtmidi_input_device = -{ - MIDI_INPUT_NAME, - MIDI_INPUT_INTERNAL_NAME, - 0, 0, - rtmidi_input_init, - rtmidi_input_close, - NULL, - { rtmidi_in_get_num_devs }, - NULL, - NULL, - midi_input_config +const device_t rtmidi_input_device = { + .name = MIDI_INPUT_NAME, + .internal_name = MIDI_INPUT_INTERNAL_NAME, + .flags = 0, + .local = 0, + .init = rtmidi_input_init, + .close = rtmidi_input_close, + .reset = NULL, + { .available = rtmidi_in_get_num_devs }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = midi_input_config }; } diff --git a/src/sound/snd_adlibgold.c b/src/sound/snd_adlibgold.c index 2a82b3b85..652c672e2 100644 --- a/src/sound/snd_adlibgold.c +++ b/src/sound/snd_adlibgold.c @@ -982,10 +982,28 @@ adgold_close(void *p) static const device_config_t adgold_config[] = { // clang-format off - { "gameport", "Enable Game port", CONFIG_BINARY, "", 1 }, - { "surround", "Surround module", CONFIG_BINARY, "", 1 }, - { "receive_input", "Receive input (MIDI)", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "gameport", + .description = "Enable Game port", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "surround", + .description = "Surround module", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input", + .description = "Receive input (MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/sound/snd_audiopci.c b/src/sound/snd_audiopci.c index 5a64d3579..251fda72f 100644 --- a/src/sound/snd_audiopci.c +++ b/src/sound/snd_audiopci.c @@ -2055,46 +2055,54 @@ es1371_speed_changed(void *p) static const device_config_t es1371_config[] = { // clang-format off { - .name = "codec", - .description = "CODEC", - .type = CONFIG_SELECTION, - .selection = { - { - .description = "Asahi Kasei AK4540", - .value = AC97_CODEC_AK4540 - }, { - .description = "Crystal CS4297", - .value = AC97_CODEC_CS4297 - }, { - .description = "Crystal CS4297A", - .value = AC97_CODEC_CS4297A - }, { - .description = "SigmaTel STAC9708", - .value = AC97_CODEC_STAC9708 - }, { - .description = "SigmaTel STAC9721", - .value = AC97_CODEC_STAC9721 - } - }, - .default_int = AC97_CODEC_CS4297A + .name = "codec", + .description = "CODEC", + .type = CONFIG_SELECTION, + .selection = { + { + .description = "Asahi Kasei AK4540", + .value = AC97_CODEC_AK4540 + }, + { + .description = "Crystal CS4297", + .value = AC97_CODEC_CS4297 + }, + { + .description = "Crystal CS4297A", + .value = AC97_CODEC_CS4297A + }, + { + .description = "SigmaTel STAC9708", + .value = AC97_CODEC_STAC9708 + }, + { + .description = "SigmaTel STAC9721", + .value = AC97_CODEC_STAC9721 + } + }, + .default_int = AC97_CODEC_CS4297A }, { - "receive_input", "Receive input (MIDI)", CONFIG_BINARY, "", 1 + .name = "receive_input", + .description = "Receive input (MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 }, - { - "", "", -1 - } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; static const device_config_t es1371_onboard_config[] = { // clang-format off { - "receive_input", "Receive input (MIDI)", CONFIG_BINARY, "", 1 + .name = "receive_input", + .description = "Receive input (MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 }, - { - "", "", -1 - } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/sound/snd_azt2316a.c b/src/sound/snd_azt2316a.c index ede159219..a72e1dbe5 100644 --- a/src/sound/snd_azt2316a.c +++ b/src/sound/snd_azt2316a.c @@ -1251,12 +1251,29 @@ static const device_config_t azt1605_config[] = { .default_int = 0 }, { - "addr", "SB Address", CONFIG_HEX16, "", 0, "", { 0 }, - { - { "0x220", 0x220 }, - { "0x240", 0x240 }, - { "Use EEPROM setting", 0 }, - { "" } + .name = "addr", + .description = "SB Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x220", + .value = 0x220 + }, + { + .description = "0x240", + .value = 0x240 + }, + { + .description = "Use EEPROM setting", + .value = 0 + }, + { + .description = "" + } } }, { @@ -1328,10 +1345,28 @@ static const device_config_t azt1605_config[] = { }, .default_int = 0 }, - { "opl", "Enable OPL", CONFIG_BINARY, "", 1 }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "receive_input401", "Receive input (MPU-401)", CONFIG_BINARY, "", 0 }, - { "", "", -1 } + { + .name = "opl", + .description = "Enable OPL", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input401", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -1341,8 +1376,7 @@ static const device_config_t azt2316a_config[] = { .name = "codec", .description = "CODEC", .type = CONFIG_SELECTION, - .selection = - { + .selection = { { .description = "CS4248", .value = AD1848_TYPE_CS4248 @@ -1361,20 +1395,36 @@ static const device_config_t azt2316a_config[] = { .default_int = 0 }, { - "addr", "SB Address", CONFIG_HEX16, "", 0, "", { 0 }, - { - { "0x220", 0x220 }, - { "0x240", 0x240 }, - { "Use EEPROM setting", 0 }, - { "" } + .name = "addr", + .description = "SB Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x220", + .value = 0x220 + }, + { + .description = "0x240", + .value = 0x240 + }, + { + .description = "Use EEPROM setting", + .value = 0 + }, + { + .description = "" + } } }, { .name = "wss_irq", .description = "WSS IRQ", .type = CONFIG_SELECTION, - .selection = - { + .selection = { { .description = "IRQ 11", .value = 11 @@ -1397,8 +1447,7 @@ static const device_config_t azt2316a_config[] = { .name = "wss_dma", .description = "WSS DMA", .type = CONFIG_SELECTION, - .selection = - { + .selection = { { .description = "DMA 0", .value = 0 @@ -1417,10 +1466,28 @@ static const device_config_t azt2316a_config[] = { }, .default_int = 0 }, - { "opl", "Enable OPL", CONFIG_BINARY, "", 1 }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "receive_input401", "Receive input (MPU-401)", CONFIG_BINARY, "", 0 }, - { "", "", -1 } + { + .name = "opl", + .description = "Enable OPL", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input401", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/sound/snd_cmi8x38.c b/src/sound/snd_cmi8x38.c index 1b08e57f3..4ce76508e 100644 --- a/src/sound/snd_cmi8x38.c +++ b/src/sound/snd_cmi8x38.c @@ -1446,16 +1446,34 @@ cmi8x38_close(void *priv) static const device_config_t cmi8x38_config[] = { // clang-format off - { "receive_input", "Receive input (MPU-401)", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "receive_input", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; static const device_config_t cmi8738_config[] = { // clang-format off - { "six_channel", "6CH variant (6-channel)", CONFIG_BINARY, "", 1 }, - { "receive_input", "Receive input (MPU-401)", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "six_channel", + .description = "6CH variant (6-channel)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/sound/snd_cms.c b/src/sound/snd_cms.c index 2be54f4fc..50b05dd48 100644 --- a/src/sound/snd_cms.c +++ b/src/sound/snd_cms.c @@ -189,20 +189,44 @@ cms_close(void *p) static const device_config_t cms_config[] = { // clang-format off { - "base", "Address", CONFIG_HEX16, "", 0x220, "", { 0 }, - { - { "0x210", 0x210 }, - { "0x220", 0x220 }, - { "0x230", 0x230 }, - { "0x240", 0x240 }, - { "0x250", 0x250 }, - { "0x260", 0x260 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x220, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x210", + .value = 0x210 + }, + { + .description = "0x220", + .value = 0x220 + }, + { + .description = "0x230", + .value = 0x230 + }, + { + .description = "0x240", + .value = 0x240 + }, + { + .description = "0x250", + .value = 0x250 + }, + { + .description = "0x260", + .value = 0x260 + }, + { + .description = "" + } } }, - { - "", "", -1 - } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/sound/snd_gus.c b/src/sound/snd_gus.c index a70798555..293be8915 100644 --- a/src/sound/snd_gus.c +++ b/src/sound/snd_gus.c @@ -1204,37 +1204,94 @@ gus_speed_changed(void *p) static const device_config_t gus_config[] = { // clang-format off { - "type", "GUS type", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Classic", GUS_CLASSIC }, + .name = "type", + .description = "GUS type", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "Classic", + .value = GUS_CLASSIC + }, #if defined(DEV_BRANCH) && defined(USE_GUSMAX) - { "MAX", GUS_MAX }, + { + .description = "MAX", + .value = GUS_MAX + }, #endif - { NULL } + { NULL } }, }, { - "base", "Address", CONFIG_HEX16, "", 0x220, "", { 0 }, - { - { "210H", 0x210 }, - { "220H", 0x220 }, - { "230H", 0x230 }, - { "240H", 0x240 }, - { "250H", 0x250 }, - { "260H", 0x260 }, + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x220, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "210H", + .value = 0x210 + }, + { + .description = "220H", + .value = 0x220 + }, + { + .description = "230H", + .value = 0x230 + }, + { + .description = "240H", + .value = 0x240 + }, + { + .description = "250H", + .value = 0x250 + }, + { + .description = "260H", + .value = 0x260 + }, }, }, { - "gus_ram", "Onboard RAM", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "256 KB", 0 }, - { "512 KB", 1 }, - { "1 MB", 2 }, - { NULL } + .name = "gus_ram", + "Onboard RAM", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "256 KB", + .value = 0 + }, + { + .description = "512 KB", + .value = 1 + }, + { + .description = "1 MB", + .value = 2 + }, + { NULL } } }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { .name = "", .description = "", .type = CONFIG_END } // clang-format off }; diff --git a/src/sound/snd_mpu401.c b/src/sound/snd_mpu401.c index 7b4a12aa3..6ee107923 100644 --- a/src/sound/snd_mpu401.c +++ b/src/sound/snd_mpu401.c @@ -1806,30 +1806,87 @@ mpu401_standalone_close(void *priv) static const device_config_t mpu401_standalone_config[] = { // clang-format off { - "base", "MPU-401 Address", CONFIG_HEX16, "", 0x330, "", { 0 }, - { - { "0x220", 0x220 }, - { "0x230", 0x230 }, - { "0x240", 0x240 }, - { "0x250", 0x250 }, - { "0x300", 0x300 }, - { "0x320", 0x320 }, - { "0x330", 0x330 }, - { "0x340", 0x340 }, - { "0x350", 0x350 }, - { "" } + .name = "base", + .description = "MPU-401 Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x330, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x220", + .value = 0x220 + }, + { + .description = "0x230", + .value = 0x230 + }, + { + .description = "0x240", + .value = 0x240 + }, + { + .description = "0x250", + .value = 0x250 + }, + { + .description = "0x300", + .value = 0x300 + }, + { + .description = "0x320", + .value = 0x320 + }, + { + .description = "0x330", + .value = 0x330 + }, + { + .description = "0x340", + .value = 0x340 + }, + { + .description = "0x350", + .value = 0x350 + }, + { .description = "" } } }, { - "irq", "MPU-401 IRQ", CONFIG_SELECTION, "", 2, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 4", 4 }, - { "IRQ 5", 5 }, - { "IRQ 6", 6 }, - { "IRQ 7", 7 }, - { "" } + .name = "irq", + .description = "MPU-401 IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 2, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "IRQ 2", + .value = 2 + }, + { + .description = "IRQ 3", + .value = 3 + }, + { + .description = "IRQ 4", + .value = 4 + }, + { + .description = "IRQ 5", + .value = 5 + }, + { + .description = "IRQ 6", + .value = 6 + }, + { + .description = "IRQ 7", + .value = 7 + }, + { .description = "" } } }, { @@ -1838,7 +1895,7 @@ static const device_config_t mpu401_standalone_config[] = { .type = CONFIG_BINARY, .default_int = 1 }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -1850,9 +1907,7 @@ static const device_config_t mpu401_standalone_mca_config[] = { .type = CONFIG_BINARY, .default_int = 1 }, - { - "", "", -1 - } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/sound/snd_pssj.c b/src/sound/snd_pssj.c index 2929baec1..41efc4218 100644 --- a/src/sound/snd_pssj.c +++ b/src/sound/snd_pssj.c @@ -239,15 +239,30 @@ pssj_close(void *p) static const device_config_t pssj_isa_config[] = { // clang-format off { - "base", "Address", CONFIG_HEX16, "", 0x2C0, "", { 0 }, - { - { "0x0C0", 0x0C0 }, - { "0x1E0", 0x1E0 }, - { "0x2C0", 0x2C0 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x2C0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x0C0", + .value = 0x0C0 + }, + { + .description = "0x1E0", + .value = 0x1E0 + }, + { + .description = "0x2C0", + .value = 0x2C0 + }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; #endif @@ -277,7 +292,7 @@ const device_t pssj_1e0_device = { { .available = NULL }, .speed_changed = NULL, .force_redraw = NULL, - .config = NULL + .config = NULL }; #if defined(DEV_BRANCH) && defined(USE_TANDY_ISA) diff --git a/src/sound/snd_sb.c b/src/sound/snd_sb.c index 9d80ef65c..247455036 100644 --- a/src/sound/snd_sb.c +++ b/src/sound/snd_sb.c @@ -2049,377 +2049,1177 @@ sb_speed_changed(void *p) // clang-format off static const device_config_t sb_config[] = { - { "base", "Address", CONFIG_HEX16, "", 0x220, "", { 0 }, - { - { "0x210", 0x210 }, - { "0x220", 0x220 }, - { "0x230", 0x230 }, - { "0x240", 0x240 }, - { "0x250", 0x250 }, - { "0x260", 0x260 }, - { "" } + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x220, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x210", + .value = 0x210 + }, + { + .description = "0x220", + .value = 0x220 + }, + { + .description = "0x230", + .value = 0x230 + }, + { + .description = "0x240", + .value = 0x240 + }, + { + .description = "0x250", + .value = 0x250 + }, + { + .description = "0x260", + .value = 0x260 }, + { .description = "" } } }, - { "irq", "IRQ", CONFIG_SELECTION, "", 7, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "" } + { + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 7, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "IRQ 2", + .value = 2 + }, + { + .description = "IRQ 3", + .value = 3 + }, + { + .description = "IRQ 5", + .value = 5 + }, + { + .description = "IRQ 7", + .value = 7 + }, + { .description = "" } } }, - { "dma", "DMA", CONFIG_SELECTION, "", 1, "", { 0 }, - { - { "DMA 1", 1 }, - { "DMA 3", 3 }, - { "" } + { + .name = "dma", + .description = "DMA", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 1, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "DMA 1", + .value = 1 + }, + { + .description = "DMA 3", + .value = 3 + }, + { "" } } }, - { "opl", "Enable OPL", CONFIG_BINARY, "", 1 }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "opl", + .description = "Enable OPL", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t sb15_config[] = { - { "base", "Address", CONFIG_HEX16, "", 0x220, "", { 0 }, - { - { "0x210", 0x210 }, - { "0x220", 0x220 }, - { "0x230", 0x230 }, - { "0x240", 0x240 }, - { "0x250", 0x250 }, - { "0x260", 0x260 }, - { "" } + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x220, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x210", + .value = 0x210 + }, + { + .description = "0x220", + .value = 0x220 + }, + { + .description = "0x230", + .value = 0x230 + }, + { + .description = "0x240", + .value = 0x240 + }, + { + .description = "0x250", + .value = 0x250 + }, + { + .description = "0x260", + .value = 0x260 + }, + { + .description = "" } } }, - { "irq", "IRQ", CONFIG_SELECTION, "", 7, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "" } + { + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 7, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "IRQ 2", + .value = 2 + }, + { + .description = "IRQ 3", + .value = 3 + }, + { + .description = "IRQ 5", + .value = 5 + }, + { + .description = "IRQ 7", + .value = 7 + }, + { .description = "" } } }, - { "dma", "DMA", CONFIG_SELECTION, "", 1, "", { 0 }, - { - { "DMA 1", 1 }, - { "DMA 3", 3 }, - { "" } + { + .name = "dma", + .description = "DMA", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 1, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "DMA 1", + .value = 1 + }, + { + .description = "DMA 3", + .value = 3 + }, + { .description = "" } } }, - { "opl", "Enable OPL", CONFIG_BINARY, "", 1 }, - { "cms", "Enable CMS", CONFIG_BINARY, "", 0 }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "opl", + .description = "Enable OPL", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "cms", + .description = "Enable CMS", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t sb2_config[] = { - { "base", "Address", CONFIG_HEX16, "", 0x220, "", { 0 }, - { - { "0x220", 0x220 }, - { "0x240", 0x240 }, - { "0x260", 0x260 }, - { "" } + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x220, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x220", + .value = 0x220 + }, + { + .description = "0x240", + .value = 0x240 + }, + { + .description = "0x260", + .value = 0x260 + }, + { .description = "" } } }, - { "mixaddr", "Mixer", CONFIG_HEX16, "", 0, "", { 0 }, - { - { "Disabled", 0 }, - { "0x220", 0x220 }, - { "0x240", 0x240 }, - { "0x250", 0x250 }, - { "0x260", 0x260 }, - { "" } + { + .name = "mixaddr", + .description = "Mixer", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "Disabled", + .value = 0 + }, + { + .description = "0x220", + .value = 0x220 + }, + { + .description = "0x240", + .value = 0x240 + }, + { + .description = "0x250", + .value = 0x250 + }, + { + .description = "0x260", + .value = 0x260 + }, + { .description = "" } } }, - { "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "" } + { + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "IRQ 2", + .value = 2 + }, + { + .description = "IRQ 3", + .value = 3 + }, + { + .description = "IRQ 5", + .value = 5 + }, + { + .description = "IRQ 7", + .value = 7 + }, + { .description = "" } } }, - { "dma", "DMA", CONFIG_SELECTION, "", 1, "", { 0 }, - { - { "DMA 1", 1 }, - { "DMA 3", 3 }, - { "" } + { + .name = "dma", + .description = "DMA", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 1, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "DMA 1", + .value = 1 + }, + { + .description = "DMA 3", + .value = 3 + }, + { .description = "" } } }, - { "opl", "Enable OPL", CONFIG_BINARY, "", 1 }, - { "cms", "Enable CMS", CONFIG_BINARY, "", 0 }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "opl", + .description = "Enable OPL", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "cms", + .description = "Enable CMS", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t sb_mcv_config[] = { - { "irq", "IRQ", CONFIG_SELECTION, "", 7, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 3", 3 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "" } + { + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 7, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "IRQ 2", + .value = 2 + }, + { + .description = "IRQ 3", + .value = 3 + }, + { + .description = "IRQ 5", + .value = 5 + }, + { + .description = "IRQ 7", + .value = 7 + }, + { .description = "" } } }, - { "dma", "DMA", CONFIG_SELECTION, "", 1, "", { 0 }, - { - { "DMA 1", 1 }, - { "DMA 3", 3 }, - { "" } + { + .name = "dma", + .description = "DMA", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 1, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "DMA 1", + .value = 1 + }, + { + .description = "DMA 3", + .value = 3 + }, + { .description = "" } } }, - { "opl", "Enable OPL", CONFIG_BINARY, "", 1 }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "opl", + .description = "Enable OPL", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t sb_pro_config[] = { - { "base", "Address", CONFIG_HEX16, "", 0x220, "", { 0 }, - { - { "0x220", 0x220 }, - { "0x240", 0x240 }, - { "" } + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x220, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x220", + .value = 0x220 + }, + { + .description = "0x240", + .value = 0x240 + }, + { .description = "" } } }, - { "irq", "IRQ", CONFIG_SELECTION, "", 7, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "IRQ 10", 10 }, - { "" } + { + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 7, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "IRQ 2", + .value = 2 + }, + { + .description = "IRQ 5", + .value = 5 + }, + { + .description = "IRQ 7", + .value = 7 + }, + { + .description = "IRQ 10", + .value = 10 + }, + { .description = "" } } }, - { "dma", "DMA", CONFIG_SELECTION, "", 1, "", { 0 }, - { - { "DMA 0", 0 }, - { "DMA 1", 1 }, - { "DMA 3", 3 }, - { "" } + { + .name = "dma", + .description = "DMA", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 1, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "DMA 0", + .value = 0 + }, + { + .description = "DMA 1", + .value = 1 + }, + { + .description = "DMA 3", + .value = 3 + }, + { .description = "" } } }, - { "opl", "Enable OPL", CONFIG_BINARY, "", 1 }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "opl", + .description = "Enable OPL", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t sb_16_config[] = { - { "base", "Address", CONFIG_HEX16, "", 0x220, "", { 0 }, - { - { "0x220", 0x220 }, - { "0x240", 0x240 }, - { "0x260", 0x260 }, - { "0x280", 0x280 }, - { "" } + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x220, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x220", + .value = 0x220 + }, + { + .description = "0x240", + .value = 0x240 + }, + { + .description = "0x260", + .value = 0x260 + }, + { + .description = "0x280", + .value = 0x280 + }, + { .description = "" } } }, - { "base401", "MPU-401 Address", CONFIG_HEX16, "", 0x330, "", { 0 }, - { - { "Disabled", 0 }, - { "0x300", 0x300 }, - { "0x330", 0x330 }, - { "" } + { + .name = "base401", + .description = "MPU-401 Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x330, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "Disabled", + .value = 0 + }, + { + .description = "0x300", + .value = 0x300 + }, + { + .description = "0x330", + .value = 0x330 + }, + { .description = "" } } }, - { "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "IRQ 10", 10 }, - { "" } + { + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "IRQ 2", + .value = 2 + }, + { + .description = "IRQ 5", + .value = 5 + }, + { + .description = "IRQ 7", + .value = 7 + }, + { + .description = "IRQ 10", + .value = 10 + }, + { .description = "" } } }, - { "dma", "Low DMA channel", CONFIG_SELECTION, "", 1, "", { 0 }, - { - { "DMA 0", 0 }, - { "DMA 1", 1 }, - { "DMA 3", 3 }, - { "" } + { + .name = "dma", + .description = "Low DMA channel", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 1, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "DMA 0", + .value = 0 + }, + { + .description = "DMA 1", + .value = 1 + }, + { + .description = "DMA 3", + .value = 3 + }, + { .description = "" } } }, - { "dma16", "High DMA channel", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "DMA 5", 5 }, - { "DMA 6", 6 }, - { "DMA 7", 7 }, - { "" } + { + .name = "dma16", + .description = "High DMA channel", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "DMA 5", + .value = 5 + }, + { + .description = "DMA 6", + .value = 6 + }, + { + .description = "DMA 7", + .value = 7 + }, + { .description = "" } } }, - { "opl", "Enable OPL", CONFIG_BINARY, "", 1 }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "receive_input401", "Receive input (MPU-401)", CONFIG_BINARY, "", 0 }, - { "", "", -1 } + { + .name = "opl", + .description = "Enable OPL", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input401", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t sb_16_pnp_config[] = { - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "receive_input401", "Receive input (MPU-401)", CONFIG_BINARY, "", 0 }, - { "", "", -1 } + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input401", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t sb_32_pnp_config[] = { - { "onboard_ram", "Onboard RAM", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "None", 0 }, - { "512 KB", 512 }, - { "2 MB", 2048 }, - { "8 MB", 8192 }, - { "28 MB", 28672 }, - { "" } + { + .name = "onboard_ram", + .description = "Onboard RAM", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "None", + .value = 0 + }, + { + .description = "512 KB", + .value = 512 + }, + { + .description = "2 MB", + .value = 2048 + }, + { + .description = "8 MB", + .value = 8192 + }, + { + .description = "28 MB", + .value = 28672 + }, + { .description = "" } } }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "receive_input401", "Receive input (MPU-401)", CONFIG_BINARY, "", 0 }, - { "", "", -1 } + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input401", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t sb_awe32_config[] = { - { "base", "Address", CONFIG_HEX16, "", 0x220, "", { 0 }, - { - { "0x220", 0x220 }, - { "0x240", 0x240 }, - { "0x260", 0x260 }, - { "0x280", 0x280 }, - { "" } + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x220, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x220", + .value = 0x220 + }, + { + .description = "0x240", + .value = 0x240 + }, + { + .description = "0x260", + .value = 0x260 + }, + { + .description = "0x280", + .value = 0x280 + }, + { .description = "" } } }, - { "emu_base", "EMU8000 Address", CONFIG_HEX16, "", 0x620, "", { 0 }, - { - { "0x620", 0x620 }, - { "0x640", 0x640 }, - { "0x660", 0x660 }, - { "0x680", 0x680 }, + { + .name = "emu_base", + .description = "EMU8000 Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x620, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x620", + .value = 0x620 + }, + { + .description = "0x640", + .value = 0x640 + }, + { + .description = "0x660", + .value = 0x660 + }, + { + .description = "0x680", + .value = 0x680 + }, { .description = ""} } }, - { "base401", "MPU-401 Address", CONFIG_HEX16, "", 0x330, "", { 0 }, - { - { "Disabled", 0 }, - { "0x300", 0x300 }, - { "0x330", 0x330 }, - { "" } + { + .name = "base401", + .description = "MPU-401 Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x330, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "Disabled", + .value = 0 + }, + { + .description = "0x300", + .value = 0x300 + }, + { + .description = "0x330", + .value = 0x330 + }, + { .description = "" } } }, - { "irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "IRQ 2", 2 }, - { "IRQ 5", 5 }, - { "IRQ 7", 7 }, - { "IRQ 10", 10 }, - { "" } + { + .name = "irq", + .description = "IRQ", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "IRQ 2", + .value = 2 + }, + { + .description = "IRQ 5", + .value = 5 + }, + { + .description = "IRQ 7", + .value = 7 + }, + { + .description = "IRQ 10", + .value = 10 + }, + { .description = "" } } }, - { "dma", "Low DMA channel", CONFIG_SELECTION, "", 1, "", { 0 }, - { - { "DMA 0", 0 }, - { "DMA 1", 1 }, - { "DMA 3", 3 }, - { "" } + { + .name = "dma", + .description = "Low DMA channel", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 1, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "DMA 0", + .value = 0 + }, + { + .description = "DMA 1", + .value = 1 + }, + { + .description = "DMA 3", + .value = 3 + }, + { .description = "" } } }, - { "dma16", "High DMA channel", CONFIG_SELECTION, "", 5, "", { 0 }, - { - { "DMA 5", 5 }, - { "DMA 6", 6 }, - { "DMA 7", 7 }, - { "" } + { + .name = "dma16", + .description = "High DMA channel", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 5, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "DMA 5", + .value = 5 + }, + { + .description = "DMA 6", + .value = 6 + }, + { + .description = "DMA 7", + .value = 7 + }, + { .description = "" } } }, - { "onboard_ram", "Onboard RAM", CONFIG_SELECTION, "", 512, "", { 0 }, - { - { "None", 0 }, - { "512 KB", 512 }, - { "2 MB", 2048 }, - { "8 MB", 8192 }, - { "28 MB", 28672 }, - { "" } + { + .name = "onboard_ram", + .description = "Onboard RAM", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 512, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "None", + .value = 0 + }, + { + .description = "512 KB", + .value = 512 + }, + { + .description = "2 MB", + .value = 2048 + }, + { + .description = "8 MB", + .value = 8192 + }, + { + .description = "28 MB", + .value = 28672 + }, + { "" } } }, - { "opl", "Enable OPL", CONFIG_BINARY, "", 1 }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "receive_input401", "Receive input (MPU-401)", CONFIG_BINARY, "", 0 }, - { "", "", -1 } + { + .name = "opl", + .description = "Enable OPL", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input401", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t sb_awe32_pnp_config[] = { - { "onboard_ram", "Onboard RAM", CONFIG_SELECTION, "", 512, "", { 0 }, - { - { "None", 0 }, - { "512 KB", 512 }, - { "2 MB", 2048 }, - { "8 MB", 8192 }, - { "28 MB", 28672 }, - { "" } + { + .name = "onboard_ram", + .description = "Onboard RAM", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 512, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "None", + .value = 0 + }, + { + .description = "512 KB", + .value = 512 + }, + { + .description = "2 MB", + .value = 2048 + }, + { + .description = "8 MB", + .value = 8192 + }, + { + .description = "28 MB", + .value = 28672 + }, + { .description = "" } } }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "receive_input401", "Receive input (MPU-401)", CONFIG_BINARY, "", 0 }, - { "", "", -1 } + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input401", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t sb_awe64_value_config[] = { - { "onboard_ram", "Onboard RAM", CONFIG_SELECTION, "", 512, "", { 0 }, - { - { "512 KB", 512 }, - { "1 MB", 1024 }, - { "2 MB", 2048 }, - { "4 MB", 4096 }, - { "8 MB", 8192 }, - { "12 MB", 12288 }, - { "16 MB", 16384 }, - { "20 MB", 20480 }, - { "24 MB", 24576 }, - { "28 MB", 28672 }, - { "" } + { + .name = "onboard_ram", + .description = "Onboard RAM", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 512, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "512 KB", + .value = 512 + }, + { + .description = "1 MB", + .value = 1024 + }, + { + .description = "2 MB", + .value = 2048 + }, + { + .description = "4 MB", + .value = 4096 + }, + { + .description = "8 MB", + .value = 8192 + }, + { + .description = "12 MB", + .value = 12288 + }, + { + .description = "16 MB", + .value = 16384 + }, + { + .description = "20 MB", + .value = 20480 + }, + { + .description = "24 MB", + .value = 24576 + }, + { + .description = "28 MB", + .value = 28672 + }, + { .description = "" } } }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "receive_input401", "Receive input (MPU-401)", CONFIG_BINARY, "", 0 }, - { "", "", -1 } + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input401", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t sb_awe64_config[] = { - { "onboard_ram", "Onboard RAM", CONFIG_SELECTION, "", 1024, "", { 0 }, - { - { "1 MB", 1024 }, - { "2 MB", 2048 }, - { "4 MB", 4096 }, - { "8 MB", 8192 }, - { "12 MB", 12288 }, - { "16 MB", 16384 }, - { "20 MB", 20480 }, - { "24 MB", 24576 }, - { "28 MB", 28672 }, - { "" } + { + .name = "onboard_ram", + .description = "Onboard RAM", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 1024, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "1 MB", + .value = 1024 + }, + { + .description = "2 MB", + .value = 2048 + }, + { + .description = "4 MB", + .value = 4096 + }, + { + .description = "8 MB", + .value = 8192 + }, + { + .description = "12 MB", + .value = 12288 + }, + { + .description = "16 MB", + .value = 16384 + }, + { + .description = "20 MB", + .value = 20480 + }, + { + .description = "24 MB", + .value = 24576 + }, + { + .description = "28 MB", + .value = 28672 + }, + { .description = "" } } }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "receive_input401", "Receive input (MPU-401)", CONFIG_BINARY, "", 0 }, - { "", "", -1 } + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input401", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } }; static const device_config_t sb_awe64_gold_config[] = { - { "onboard_ram", "Onboard RAM", CONFIG_SELECTION, "", 4096, "", { 0 }, - { - { "4 MB", 4096 }, - { "8 MB", 8192 }, - { "12 MB", 12288 }, - { "16 MB", 16384 }, - { "20 MB", 20480 }, - { "24 MB", 24576 }, - { "28 MB", 28672 }, - { "" } + { + .name = "onboard_ram", + .description = "Onboard RAM", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 4096, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "4 MB", + .value = 4096 + }, + { + .description = "8 MB", + .value = 8192 + }, + { + .description = "12 MB", + .value = 12288 + }, + { + .description = "16 MB", + .value = 16384 + }, + { + .description = "20 MB", + .value = 20480 + }, + { + .description = "24 MB", + .value = 24576 + }, + { + .description = "28 MB", + .value = 28672 + }, + { .description = "" } } }, - { "receive_input", "Receive input (SB MIDI)", CONFIG_BINARY, "", 1 }, - { "receive_input401", "Receive input (MPU-401)", CONFIG_BINARY, "", 0 }, - { "", "", -1 } + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input401", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } }; // clang-format on diff --git a/src/sound/snd_sn76489.c b/src/sound/snd_sn76489.c index ad2581b33..125eff4d6 100644 --- a/src/sound/snd_sn76489.c +++ b/src/sound/snd_sn76489.c @@ -247,15 +247,30 @@ sn76489_device_close(void *p) static const device_config_t tndy_config[] = { // clang-format off { - "base", "Address", CONFIG_HEX16, "", 0x0C0, "", { 0 }, - { - { "0x0C0", 0x0C0 }, - { "0x1E0", 0x1E0 }, - { "0x2C0", 0x2C0 }, - { "" } + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x0C0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x0C0", + .value = 0x0C0 + }, + { + .description = "0x1E0", + .value = 0x1E0 + }, + { + .description = "0x2C0", + .value = 0x2C0 + }, + { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; #endif diff --git a/src/sound/snd_ssi2001.c b/src/sound/snd_ssi2001.c index 127968d96..211091dfa 100644 --- a/src/sound/snd_ssi2001.c +++ b/src/sound/snd_ssi2001.c @@ -92,13 +92,32 @@ ssi2001_close(void *p) static const device_config_t ssi2001_config[] = { // clang-format off - { "base", "Address", CONFIG_HEX16, "", 0x280, "", { 0 }, - { - { "0x280", 0x280 }, - { "0x2A0", 0x2A0 }, - { "0x2C0", 0x2C0 }, - { "0x2E0", 0x2E0 }, - { "" } + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x280, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x280", + .value = 0x280 + }, + { + .description = "0x2A0", + .value = 0x2A0 + }, + { + .description = "0x2C0", + .value = 0x2C0 + }, + { + .description = "0x2E0", + .value = 0x2E0 + }, + { .description = "" } } }, { "gameport", "Enable Game port", CONFIG_BINARY, "", 1 }, diff --git a/src/sound/snd_wss.c b/src/sound/snd_wss.c index aafb7cbeb..8df4791c6 100644 --- a/src/sound/snd_wss.c +++ b/src/sound/snd_wss.c @@ -228,17 +228,42 @@ wss_speed_changed(void *priv) static const device_config_t wss_config[] = { // clang-format off - { "base", "Address", CONFIG_HEX16, "", 0x530, "", { 0 }, - { - { "0x530", 0x530 }, - { "0x604", 0x604 }, - { "0xe80", 0xe80 }, - { "0xf40", 0xf40 }, - { "" } + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x530, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x530", + .value = 0x530 + }, + { + .description = "0x604", + .value = 0x604 + }, + { + .description = "0xe80", + .value = 0xe80 + }, + { + .description = "0xf40", + .value = 0xf40 + }, + { .description = "" } } }, - { "opl", "Enable OPL", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "opl", + .description = "Enable OPL", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; From d28cec126a0b96d48d6e2e07744c111131a7b0c3 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 9 Apr 2022 20:09:14 -0400 Subject: [PATCH 30/78] src/video --- src/video/vid_ati28800.c | 60 ++++++--- src/video/vid_ati_mach64.c | 55 +++++++-- src/video/vid_cga.c | 85 ++++++++++--- src/video/vid_cl54xx.c | 14 +-- src/video/vid_colorplus.c | 54 ++++++-- src/video/vid_ega.c | 33 +++-- src/video/vid_et4000.c | 30 +++-- src/video/vid_et4000w32.c | 25 +++- src/video/vid_hercules.c | 43 +++++-- src/video/vid_herculesplus.c | 43 +++++-- src/video/vid_ht216.c | 86 +++++++++---- src/video/vid_mda.c | 35 ++++-- src/video/vid_mga.c | 5 +- src/video/vid_nga.c | 98 +++++++++++---- src/video/vid_oak_oti.c | 81 +++++++++--- src/video/vid_ogc.c | 42 +++++-- src/video/vid_paradise.c | 217 +++++++++++++++++---------------- src/video/vid_rtg310x.c | 34 ++++-- src/video/vid_s3.c | 145 ++++++++++++++++------ src/video/vid_s3_virge.c | 140 ++++++++++++++++----- src/video/vid_sigma.c | 114 +++++++++++++---- src/video/vid_table.c | 44 +++---- src/video/vid_tgui9440.c | 4 +- src/video/vid_tvga.c | 30 +++-- src/video/vid_voodoo.c | 24 ++-- src/video/vid_voodoo_banshee.c | 211 +++++++++++++++----------------- 26 files changed, 1209 insertions(+), 543 deletions(-) diff --git a/src/video/vid_ati28800.c b/src/video/vid_ati28800.c index a305c80c0..87abb7da8 100644 --- a/src/video/vid_ati28800.c +++ b/src/video/vid_ati28800.c @@ -708,29 +708,61 @@ ati28800_force_redraw(void *priv) // clang-format off static const device_config_t ati28800_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 512, "", { 0 }, - { - { "256 kB", 256 }, - { "512 kB", 512 }, - { "1 MB", 1024 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 512, + .selection = { + { + .description = "256 kB", + .value = 256 + }, + { + .description = "512 kB", + .value = 512 + }, + { + .description = "1 MB", + .value = 1024 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; #if defined(DEV_BRANCH) && defined(USE_XL24) static const device_config_t ati28800_wonderxl_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 512, "", { 0 }, - { - { "256 kB", 256 }, - { "512 kB", 512 }, - { "1 MB", 1024 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 512, + .selection = { + { + .description = "256 kB", + .value = 256 + }, + { + .description = "512 kB", + .value = 512 + }, + { + .description = "1 MB", + .value = 1024 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; #endif // clang-format on diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index db111fa37..3cfc22db3 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -3684,27 +3684,56 @@ void mach64_force_redraw(void *p) // clang-format off static const device_config_t mach64gx_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 4, "", { 0 }, - { - { "1 MB", 1 }, - { "2 MB", 2 }, - { "4 MB", 4 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 4, + .selection = { + { + .description = "1 MB", + .value = 1 + }, + { + .description = "2 MB", + .value = 2 + }, + { + .description = "4 MB", + .value = 4 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; static const device_config_t mach64vt2_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 4, "", { 0 }, - { - { "2 MB", 2 }, - { "4 MB", 4 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 4, + .selection = { + { + .description = "2 MB", + .value = 2 + }, + { + .description = "4 MB", + .value = 4 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; // clang-format on diff --git a/src/video/vid_cga.c b/src/video/vid_cga.c index 3a0eacc96..9369f1451 100644 --- a/src/video/vid_cga.c +++ b/src/video/vid_cga.c @@ -578,37 +578,82 @@ cga_speed_changed(void *p) // clang-format off const device_config_t cga_config[] = { { - "display_type", "Display type", CONFIG_SELECTION, "", CGA_RGB, "", { 0 }, - { - { "RGB", CGA_RGB }, - { "Composite", CGA_COMPOSITE }, - { "" } + .name = "display_type", + .description = "Display type", + .type = CONFIG_SELECTION, + .default_int = CGA_RGB, + .selection = { + { + .description = "RGB", + .value = CGA_RGB + }, + { + .description = "Composite", + .value = CGA_COMPOSITE + }, + { + .description = "" + } } }, { - "composite_type", "Composite type", CONFIG_SELECTION, "", COMPOSITE_OLD, "", { 0 }, - { - { "Old", COMPOSITE_OLD }, - { "New", COMPOSITE_NEW }, - { "" } + .name = "composite_type", + .description = "Composite type", + .type = CONFIG_SELECTION, + .default_int = COMPOSITE_OLD, + .selection = { + { + .description = "Old", + .value = COMPOSITE_OLD + }, + { + .description = "New", + .value = COMPOSITE_NEW + }, + { + .description = "" + } } }, { - "rgb_type", "RGB type", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Color", 0 }, - { "Green Monochrome", 1 }, - { "Amber Monochrome", 2 }, - { "Gray Monochrome", 3 }, - { "Color (no brown)", 4 }, - { "" } + .name = "rgb_type", + .description = "RGB type", + .type = CONFIG_SELECTION, + .default_int = 0, + .selection = { + { + .description = "Color", + .value = 0 + }, + { + .description = "Green Monochrome", + .value = 1 + }, + { + .description = "Amber Monochrome", + .value = 2 + }, + { + .description = "Gray Monochrome", + .value = 3 + }, + { + .description = "Color (no brown)", + .value = 4 + }, + { + .description = "" + } } }, { - "snow_enabled", "Snow emulation", CONFIG_BINARY, "", 1 + .name = "snow_enabled", + .description = "Snow emulation", + .type = CONFIG_BINARY, + .default_int = 1 }, { - "", "", -1 + .type = CONFIG_END } }; // clang-format on diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index a39b9aea4..6663080b8 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -4304,7 +4304,7 @@ static const device_config_t gd542x_config[] = { .default_int = 512 }, { - .type = -1 + .type = CONFIG_END } }; @@ -4333,7 +4333,7 @@ static const device_config_t gd5426_config[] = { .default_int = 2048 }, { - .type = -1 + .type = CONFIG_END } }; @@ -4362,7 +4362,7 @@ static const device_config_t gd5428_onboard_config[] = { .default_int = 2048 }, { - .type = -1 + .type = CONFIG_END } }; @@ -4387,7 +4387,7 @@ static const device_config_t gd5429_config[] = { .default_int = 2 }, { - .type = -1 + .type = CONFIG_END } }; @@ -4412,7 +4412,7 @@ static const device_config_t gd5440_onboard_config[] = { .default_int = 2 }, { - .type = -1 + .type = CONFIG_END } }; @@ -4441,7 +4441,7 @@ static const device_config_t gd5434_config[] = { .default_int = 4 }, { - .type = -1 + .type = CONFIG_END } }; @@ -4470,7 +4470,7 @@ static const device_config_t gd5434_onboard_config[] = { .default_int = 4 }, { - .type = -1 + .type = CONFIG_END } }; diff --git a/src/video/vid_colorplus.c b/src/video/vid_colorplus.c index bd68c43b9..2dc2d2308 100644 --- a/src/video/vid_colorplus.c +++ b/src/video/vid_colorplus.c @@ -427,27 +427,55 @@ void colorplus_speed_changed(void *p) cga_recalctimings(&colorplus->cga); } - static const device_config_t colorplus_config[] = { // clang-format off { - "display_type", "Display type", CONFIG_SELECTION, "", CGA_RGB, "", { 0 }, - { - { "RGB", CGA_RGB }, - { "Composite", CGA_COMPOSITE }, - { "" } + .name = "display_type", + .description = "Display type", + .type = CONFIG_SELECTION, + .default_int = CGA_RGB, + .selection = { + { + .description = "RGB", + .value = CGA_RGB + }, + { + .description = "Composite", + .value = CGA_COMPOSITE + }, + { + .description = "" + } } }, { - "composite_type", "Composite type", CONFIG_SELECTION, "", COMPOSITE_OLD, "", { 0 }, - { - { "Old", COMPOSITE_OLD }, - { "New", COMPOSITE_NEW }, - { "" } + .name = "composite_type", + .description = "Composite type", + .type = CONFIG_SELECTION, + .default_int = COMPOSITE_OLD, + .selection = { + { + .description = "Old", + .value = COMPOSITE_OLD + }, + { + .description = "New", + .value = COMPOSITE_NEW + }, + { + .description = "" + } } }, - { "snow_enabled", "Snow emulation", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "snow_enabled", + .description = "Snow emulation", + .type = CONFIG_BINARY, + .default_int = 1 + }, + { + .type = CONFIG_END + } // clang-format on }; diff --git a/src/video/vid_ega.c b/src/video/vid_ega.c index 41a34ef09..e76c68afa 100644 --- a/src/video/vid_ega.c +++ b/src/video/vid_ega.c @@ -1179,13 +1179,30 @@ ega_speed_changed(void *p) static const device_config_t ega_config[] = { // clang-format off { - "memory", "Memory size", CONFIG_SELECTION, "", 256, "", { 0 }, - { - { "32 kB", 32 }, - { "64 kB", 64 }, - { "128 kB", 128 }, - { "256 kB", 256 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 256, + .selection = { + { + .description = "32 kB", + .value = 32 + }, + { + .description = "64 kB", + .value = 64 + }, + { + .description = "128 kB", + .value = 128 + }, + { + .description = "256 kB", + .value = 256 + }, + { + .description = "" + } } }, { @@ -1228,7 +1245,7 @@ static const device_config_t ega_config[] = { .default_int = 9 }, { - .type = -1 + .type = CONFIG_END } // clang-format on }; diff --git a/src/video/vid_et4000.c b/src/video/vid_et4000.c index 119c0b0ed..c18a422a3 100644 --- a/src/video/vid_et4000.c +++ b/src/video/vid_et4000.c @@ -807,15 +807,31 @@ et4000_kasan_available(void) static const device_config_t et4000_config[] = { // clang-format off { - "memory", "Memory size", CONFIG_SELECTION, "", 1024, "", { 0 }, - { - { "256 KB", 256 }, - { "512 KB", 512 }, - { "1 MB", 1024 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 1024, + .selection = { + { + .description = "256 KB", + .value = 256 + }, + { + .description = "512 KB", + .value = 512 + }, + { + .description = "1 MB", + .value = 1024 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } // clang-format on }; diff --git a/src/video/vid_et4000w32.c b/src/video/vid_et4000w32.c index e318e2099..a69736d40 100644 --- a/src/video/vid_et4000w32.c +++ b/src/video/vid_et4000w32.c @@ -2193,14 +2193,27 @@ et4000w32p_force_redraw(void *p) static const device_config_t et4000w32p_config[] = { // clang-format off { - "memory", "Memory size", CONFIG_SELECTION, "", 2, "", { 0 }, - { - { "1 MB", 1 }, - { "2 MB", 2 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 2, + .selection = { + { + .description = "1 MB", + .value = 1 + }, + { + .description = "2 MB", + .value = 2 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } // clang-format on }; diff --git a/src/video/vid_hercules.c b/src/video/vid_hercules.c index bc69a785a..d310fa419 100644 --- a/src/video/vid_hercules.c +++ b/src/video/vid_hercules.c @@ -608,21 +608,44 @@ speed_changed(void *priv) recalc_timings(dev); } - static const device_config_t hercules_config[] = { // clang-format off { - "rgb_type", "Display type", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Default", 0 }, - { "Green", 1 }, - { "Amber", 2 }, - { "Gray", 3 }, - { "" } + .name = "rgb_type", + .description = "Display type", + .type = CONFIG_SELECTION, + .default_int = 0, + .selection = { + { + .description = "Default", + .value = 0 + }, + { + .description = "Green", + .value = 1 + }, + { + .description = "Amber", + .value = 2 + }, + { + .description = "Gray", + .value = 3 + }, + { + .description = "" + } } }, - { "blend", "Blend", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "blend", + .description = "Blend", + .type = CONFIG_BINARY, + .default_int = 1 + }, + { + .type = CONFIG_END + } // clang-format on }; diff --git a/src/video/vid_herculesplus.c b/src/video/vid_herculesplus.c index ad30a6393..4233bec7b 100644 --- a/src/video/vid_herculesplus.c +++ b/src/video/vid_herculesplus.c @@ -693,21 +693,44 @@ speed_changed(void *priv) recalc_timings(dev); } - static const device_config_t herculesplus_config[] = { // clang-format off { - "rgb_type", "Display type", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Default", 0 }, - { "Green", 1 }, - { "Amber", 2 }, - { "Gray", 3 }, - { "" } + .name = "rgb_type", + .description = "Display type", + .type = CONFIG_SELECTION, + .default_int = 0, + .selection = { + { + .description = "Default", + .value = 0 + }, + { + .description = "Green", + .value = 1 + }, + { + .description = "Amber", + .value = 2 + }, + { + .description = "Gray", + .value = 3 + }, + { + .description = "" + } } }, - { "blend", "Blend", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "blend", + .description = "Blend", + .type = CONFIG_BINARY, + .default_int = 1 + }, + { + .type = CONFIG_END + } // clang-format on }; diff --git a/src/video/vid_ht216.c b/src/video/vid_ht216.c index a95899d97..a9b54c1f0 100644 --- a/src/video/vid_ht216.c +++ b/src/video/vid_ht216.c @@ -1621,44 +1621,88 @@ ht216_force_redraw(void *p) ht216->svga.fullchange = changeframecount; } - static const device_config_t v7_vga_1024i_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 512, "", { 0 }, - { - { "256 kB", 256 }, - { "512 kB", 512 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 512, + .selection = { + { + .description = "256 kB", + .value = 256 + }, + { + .description = "512 kB", + .value = 512 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; // clang-format off static const device_config_t ht216_32_standalone_config[] = { { - "monitor_type", "Monitor type", CONFIG_SELECTION, "", 0x18, "", { 0 }, - { - { "Mono Interlaced", 0x00 }, - { "Mono Non-Interlaced", 0x08 }, - { "Color Interlaced", 0x10 }, - { "Color Non-Interlaced", 0x18 }, - { "" } + .name = "monitor_type", + .description = "Monitor type", + .type = CONFIG_SELECTION, + .default_int = 0x18, + .selection = { + { + .description = "Mono Interlaced", + .value = 0x00 + }, + { + .description = "Mono Non-Interlaced", + .value = 0x08 + }, + { + .description = "Color Interlaced", + .value = 0x10 + }, + { + .description = "Color Non-Interlaced", + .value = 0x18 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; static const device_config_t radius_svga_multiview_config[] = { { - "extensions", "Extensions", CONFIG_SELECTION, "", 0x00, "", { 0 }, - { - { "Extensions Enabled", 0x00 }, - { "Extensions Disabled", 0x02 }, - { "" } + .name = "extensions", + .description = "Extensions", + .type = CONFIG_SELECTION, + .default_int = 0x00, + .selection = { + { + .description = "Extensions Enabled", + .value = 0x00 + }, + { + .description = "Extensions Disabled", + .value = 0x02 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; // clang-format on diff --git a/src/video/vid_mda.c b/src/video/vid_mda.c index 83987ef83..abd6c7c88 100644 --- a/src/video/vid_mda.c +++ b/src/video/vid_mda.c @@ -330,16 +330,35 @@ void mda_speed_changed(void *p) static const device_config_t mda_config[] = { // clang-format off { - "rgb_type", "Display type", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Default", 0 }, - { "Green", 1 }, - { "Amber", 2 }, - { "Gray", 3 }, - { "" } + .name = "rgb_type", + .description = "Display type", + .type = CONFIG_SELECTION, + .default_int = 0, + .selection = { + { + .description = "Default", + .value = 0 + }, + { + .description = "Green", + .value = 1 + }, + { + .description = "Amber", + .value = 2 + }, + { + .description = "Gray", + .value = 3 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } // clang-format on }; diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index ea365e2ba..bfb83d9c2 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -5336,7 +5336,6 @@ mystique_force_redraw(void *p) mystique->svga.fullchange = changeframecount; } - static const device_config_t mystique_config[] = { // clang-format off { @@ -5363,7 +5362,9 @@ static const device_config_t mystique_config[] = { }, .default_int = 8 }, - { .type = -1 } + { + .type = CONFIG_END + } // clang-format on }; diff --git a/src/video/vid_nga.c b/src/video/vid_nga.c index 4d500b178..befe01671 100644 --- a/src/video/vid_nga.c +++ b/src/video/vid_nga.c @@ -598,42 +598,94 @@ nga_init(const device_t *info) return nga; } - const device_config_t nga_config[] = { // clang-format off { - "rgb_type", "RGB type", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Color", 0 }, - { "Green Monochrome", 1 }, - { "Amber Monochrome", 2 }, - { "Gray Monochrome", 3 }, - { "Color (no brown)", 4 }, - { "" } + .name = "rgb_type", + .description = "RGB type", + .type = CONFIG_SELECTION, + .default_int = 0, + .selection = { + { + .description = "Color", + .value = 0 + }, + { + .description = "Green Monochrome", + .value = 1 + }, + { + .description = "Amber Monochrome", + .value = 2 + }, + { + .description = "Gray Monochrome", + .value = 3 + }, + { + .description = "Color (no brown)", + .value = 4 + }, + { + .description = "" + } } }, { - "snow_enabled", "Snow emulation", CONFIG_BINARY, "", 1 + .name = "snow_enabled", + .description = "Snow emulation", + .type = CONFIG_BINARY, + .default_int = 1 }, { - "memory", "Memory size", CONFIG_SELECTION, "", 64, "", { 0 }, - { - { "32 KB", 32 }, - { "64 KB", 64 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 64, + .selection = { + { + .description = "32 KB", + .value = 32 + }, + { + .description = "64 KB", + .value = 64 + }, + { + .description = "" + } } }, { - "charset", "Character set", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "U.S. English", 0 }, - { "Scandinavian", 1 }, - { "Other languages", 2 }, - { "E.F. Hutton", 3 }, - { "" } + .name = "charset", + .description = "Character set", + .type = CONFIG_SELECTION, + .default_int = 0, + .selection = { + { + .description = "U.S. English", + .value = 0 + }, + { + .description = "Scandinavian", + .value = 1 + }, + { + .description = "Other languages", + .value = 2 + }, + { + .description = "E.F. Hutton", + .value = 3 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } // clang-format on }; diff --git a/src/video/vid_oak_oti.c b/src/video/vid_oak_oti.c index fb1945aa7..210afc2b2 100644 --- a/src/video/vid_oak_oti.c +++ b/src/video/vid_oak_oti.c @@ -500,43 +500,84 @@ oti067_m300_available(void) return(rom_present(BIOS_067_M300_08_PATH)); } - // clang-format off static const device_config_t oti067_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 512, "", { 0 }, - { - { "256 kB", 256 }, - { "512 kB", 512 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 512, + .selection = { + { + .description = "256 kB", + .value = 256 + }, + { + .description = "512 kB", + .value = 512 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; static const device_config_t oti067_ama932j_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 256, "", { 0 }, - { - { "256 kB", 256 }, - { "512 kB", 512 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 256, + .selection = { + { + .description = "256 kB", + .value = 256 + }, + { + .description = "512 kB", + .value = 512 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; static const device_config_t oti077_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 1024, "", { 0 }, - { - { "256 kB", 256 }, - { "512 kB", 512 }, - { "1 MB", 1024 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 1024, + .selection = { + { + .description = "256 kB", + .value = 256 + }, + { + .description = "512 kB", + .value = 512 + }, + { + .description = "1 MB", + .value = 1024 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; // clang-format on diff --git a/src/video/vid_ogc.c b/src/video/vid_ogc.c index 9e751948f..0487d691d 100644 --- a/src/video/vid_ogc.c +++ b/src/video/vid_ogc.c @@ -639,17 +639,41 @@ const device_config_t ogc_m24_config[] = { // clang-format off { /* Olivetti / ATT compatible displays */ - "rgb_type", "RGB type", CONFIG_SELECTION, "", CGA_RGB, "", { 0 }, - { - { "Color", 0 }, - { "Green Monochrome", 1 }, - { "Amber Monochrome", 2 }, - { "Gray Monochrome", 3 }, - { "" } + .name = "rgb_type", + .description = "RGB type", + .type = CONFIG_SELECTION, + .default_int = CGA_RGB, + .selection = { + { + .description = "Color", + .value = 0 + }, + { + .description = "Green Monochrome", + .value = 1 + }, + { + .description = "Amber Monochrome", + .value = 2 + }, + { + .description = "Gray Monochrome", + .value = 3 + }, + { + .description = "" + } } }, - { "snow_enabled", "Snow emulation", CONFIG_BINARY, "", 1, }, - { "", "", -1 } + { + .name = "snow_enabled", + .description = "Snow emulation", + .type = CONFIG_BINARY, + .default_int = 1, + }, + { + .type = CONFIG_END + } // clang-format on }; diff --git a/src/video/vid_paradise.c b/src/video/vid_paradise.c index c64afb7d5..59b9f2247 100644 --- a/src/video/vid_paradise.c +++ b/src/video/vid_paradise.c @@ -717,126 +717,139 @@ void paradise_force_redraw(void *p) paradise->svga.fullchange = changeframecount; } -const device_t paradise_pvga1a_pc2086_device = -{ - "Paradise PVGA1A (Amstrad PC2086)", - "pvga1a_pc2086", - 0, - PVGA1A, - paradise_pvga1a_pc2086_init, - paradise_close, - NULL, - { NULL }, - paradise_speed_changed, - paradise_force_redraw, - NULL +const device_t paradise_pvga1a_pc2086_device = { + .name = "Paradise PVGA1A (Amstrad PC2086)", + .internal_name = "pvga1a_pc2086", + .flags = 0, + .local = PVGA1A, + .init = paradise_pvga1a_pc2086_init, + .close = paradise_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = paradise_speed_changed, + .force_redraw = paradise_force_redraw, + .config = NULL }; -const device_t paradise_pvga1a_pc3086_device = -{ - "Paradise PVGA1A (Amstrad PC3086)", - "pvga1a_pc3086", - 0, - PVGA1A, - paradise_pvga1a_pc3086_init, - paradise_close, - NULL, - { NULL }, - paradise_speed_changed, - paradise_force_redraw, - NULL +const device_t paradise_pvga1a_pc3086_device = { + .name = "Paradise PVGA1A (Amstrad PC3086)", + .internal_name = "pvga1a_pc3086", + .flags = 0, + .local = PVGA1A, + .init = paradise_pvga1a_pc3086_init, + .close = paradise_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = paradise_speed_changed, + .force_redraw = paradise_force_redraw, + .config = NULL }; -static const device_config_t paradise_pvga1a_config[] = -{ - { - "memory", "Memory size", CONFIG_SELECTION, "", 512, "", { 0 }, - { - { - "256 kB", 256 - }, - { - "512 kB", 512 - }, - { - "" - } - } - }, - { - "", "", -1 +static const device_config_t paradise_pvga1a_config[] = { + { + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 512, + .selection = { + { + .description = "256 kB", + .value = 256 + }, + { + .description = "512 kB", + .value = 512 + }, + { + .description = "" + } } + }, + { + .type = CONFIG_END + } }; -const device_t paradise_pvga1a_ncr3302_device = -{ - "Paradise PVGA1A (NCR 3302)", - "pvga1a_ncr3302", - 0, - PVGA1A, - paradise_pvga1a_ncr3302_init, - paradise_close, - NULL, - { NULL }, - paradise_speed_changed, - paradise_force_redraw, - paradise_pvga1a_config +const device_t paradise_pvga1a_ncr3302_device = { + .name = "Paradise PVGA1A (NCR 3302)", + .internal_name = "pvga1a_ncr3302", + .flags = 0, + .local = PVGA1A, + .init = paradise_pvga1a_ncr3302_init, + .close = paradise_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = paradise_speed_changed, + .force_redraw = paradise_force_redraw, + .config = paradise_pvga1a_config }; -const device_t paradise_pvga1a_device = -{ - "Paradise PVGA1A", - "pvga1a", - DEVICE_ISA, - PVGA1A, - paradise_pvga1a_standalone_init, - paradise_close, - NULL, - { paradise_pvga1a_standalone_available }, - paradise_speed_changed, - paradise_force_redraw, - paradise_pvga1a_config +const device_t paradise_pvga1a_device = { + .name = "Paradise PVGA1A", + .internal_name = "pvga1a", + .flags = DEVICE_ISA, + .local = PVGA1A, + .init = paradise_pvga1a_standalone_init, + .close = paradise_close, + .reset = NULL, + { .available = paradise_pvga1a_standalone_available }, + .speed_changed = paradise_speed_changed, + .force_redraw = paradise_force_redraw, + .config = paradise_pvga1a_config }; -const device_t paradise_wd90c11_megapc_device = -{ - "Paradise WD90C11 (Amstrad MegaPC)", - "wd90c11_megapc", - 0, - WD90C11, - paradise_wd90c11_megapc_init, - paradise_close, - NULL, - { NULL }, - paradise_speed_changed, - paradise_force_redraw, - NULL + +const device_t paradise_wd90c11_megapc_device = { + .name = "Paradise WD90C11 (Amstrad MegaPC)", + .internal_name = "wd90c11_megapc", + .flags = 0, + .local = WD90C11, + .init = paradise_wd90c11_megapc_init, + .close = paradise_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = paradise_speed_changed, + .force_redraw = paradise_force_redraw, + .config = NULL }; -const device_t paradise_wd90c11_device = -{ - "Paradise WD90C11-LR", - "wd90c11", - DEVICE_ISA, - WD90C11, - paradise_wd90c11_standalone_init, - paradise_close, - NULL, - { paradise_wd90c11_standalone_available }, - paradise_speed_changed, - paradise_force_redraw, - NULL + +const device_t paradise_wd90c11_device = { + .name = "Paradise WD90C11-LR", + .internal_name = "wd90c11", + .flags = DEVICE_ISA, + .local = WD90C11, + .init = paradise_wd90c11_standalone_init, + .close = paradise_close, + .reset = NULL, + { .available = paradise_wd90c11_standalone_available }, + .speed_changed = paradise_speed_changed, + .force_redraw = paradise_force_redraw, + .config = NULL }; static const device_config_t paradise_wd90c30_config[] = { // clang-format off { - "memory", "Memory size", CONFIG_SELECTION, "", 1024, "", { 0 }, - { - { "512 kB", 512 }, - { "1 MB", 1024 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 1024, + .selection = { + { + .description = "512 kB", + .value = 512 + }, + { + .description = "1 MB", + .value = 1024 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } // clang-format on }; diff --git a/src/video/vid_rtg310x.c b/src/video/vid_rtg310x.c index 7c046782a..2eb82626b 100644 --- a/src/video/vid_rtg310x.c +++ b/src/video/vid_rtg310x.c @@ -361,15 +361,31 @@ rtg_available(void) static const device_config_t rtg_config[] = { // clang-format off { - "memory", "Memory size", CONFIG_SELECTION, "", 1024, "", { 0 }, - { - { "256 KB", 256 }, - { "512 KB", 512 }, - { "1 MB", 1024 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 1024, + .selection = { + { + .description = "256 KB", + .value = 256 + }, + { + .description = "512 KB", + .value = 512 + }, + { + .description = "1 MB", + .value = 1024 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } // clang-format on }; @@ -379,8 +395,8 @@ const device_t realtek_rtg3106_device = { .flags = DEVICE_ISA | DEVICE_AT, .local = 2, .init = rtg_init, - .close = rtg_close, - .reset = NULL, + .close = rtg_close, + .reset = NULL, { .available = rtg_available }, .speed_changed = rtg_speed_changed, .force_redraw = rtg_force_redraw, diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index c9fd1f41a..23184560d 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -7611,67 +7611,144 @@ static void s3_force_redraw(void *p) static const device_config_t s3_orchid_86c911_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 1, "", { 0 }, - { - { "512 KB", 0 }, - { "1 MB", 1 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 1, + .selection = { + { + .description = "512 KB", + .value = 0 + }, + { + .description = "1 MB", + .value = 1 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; static const device_config_t s3_9fx_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 2, "", { 0 }, - { - { "1 MB", 1 }, - { "2 MB", 2 }, + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 2, + .selection = { + { + .description = "1 MB", + .value = 1 + }, + { + .description = "2 MB", + .value = 2 + }, /*Trio64 also supports 4 MB, however the Number Nine BIOS does not*/ - { "" } + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; static const device_config_t s3_phoenix_trio32_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 2, "", { 0 }, - { - { "512 KB", 0 }, - { "1 MB", 1 }, - { "2 MB", 2 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 2, + .selection = { + { + .description = "512 KB", + .value = 0 + }, + { + .description = "1 MB", + .value = 1 + }, + { + .description = "2 MB", + .value = 2 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; static const device_config_t s3_standard_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 4, "", { 0 }, - { - { "1 MB", 1 }, - { "2 MB", 2 }, - { "4 MB", 4 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 4, + .selection = { + { + .description = "1 MB", + .value = 1 + }, + { + .description = "2 MB", + .value = 2 + }, + { + .description = "4 MB", + .value = 4 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; static const device_config_t s3_968_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 4, "", { 0 }, - { - { "1 MB", 1 }, - { "2 MB", 2 }, - { "4 MB", 4 }, - { "8 MB", 8 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 4, + .selection = { + { + .description = "1 MB", + .value = 1 + }, + { + .description = "2 MB", + .value = 2 + }, + { + .description = "4 MB", + .value = 4 + }, + { + .description = "8 MB", + .value = 8 + }, + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } }; const device_t s3_orchid_86c911_isa_device = { diff --git a/src/video/vid_s3_virge.c b/src/video/vid_s3_virge.c index eec18bf32..0e9f5d66c 100644 --- a/src/video/vid_s3_virge.c +++ b/src/video/vid_s3_virge.c @@ -4219,51 +4219,135 @@ static void s3_virge_force_redraw(void *p) static const device_config_t s3_virge_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 4, "", { 0 }, - { - { "2 MB", 2 }, - { "4 MB", 4 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 4, + .selection = { + { + .description = "2 MB", + .value = 2 + }, + { + .description = "4 MB", + .value = 4 + }, + { + .description = "" + } } }, - { "bilinear", "Bilinear filtering", CONFIG_BINARY, "", 1 }, - { "dithering", "Dithering", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "bilinear", + .description = "Bilinear filtering", + .type = CONFIG_BINARY, + .default_int = 1 + }, + { + .name = "dithering", + .description = "Dithering", + .type = CONFIG_BINARY, + .default_int = 1 + }, + { + .type = CONFIG_END + } }; static const device_config_t s3_virge_stb_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 4, "", { 0 }, - { - { "2 MB", 2 }, - { "4 MB", 4 }, - { "8 MB", 8 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 4, + .selection = { + { + .description = "2 MB", + .value = 2 + }, + { + .description = "4 MB", + .value = 4 + }, + { + .description = "8 MB", + .value = 8 + }, + { + .description = "" + } } }, - { "bilinear", "Bilinear filtering", CONFIG_BINARY, "", 1 }, - { "dithering", "Dithering", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "bilinear", + .description = "Bilinear filtering", + .type = CONFIG_BINARY, + .default_int = 1 + }, + { + .name = "dithering", + .description = "Dithering", + .type = CONFIG_BINARY, + .default_int = 1 + }, + { + .type = CONFIG_END + } }; static const device_config_t s3_virge_357_config[] = { - { "bilinear", "Bilinear filtering", CONFIG_BINARY, "", 1 }, - { "dithering", "Dithering", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "bilinear", + .description = "Bilinear filtering", + .type = CONFIG_BINARY, + .default_int = 1 + }, + { + .name = "dithering", + .description = "Dithering", + .type = CONFIG_BINARY, + .default_int = 1 + }, + { + .type = CONFIG_END + } }; static const device_config_t s3_trio3d2x_config[] = { { - "memory", "Memory size", CONFIG_SELECTION, "", 4, "", { 0 }, - { - { "4 MB", 4 }, - { "8 MB", 8 }, - { "" } + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 4, + .selection = { + { + .description = "4 MB", + .value = 4 + }, + { + .description = "8 MB", + .value = 8 + }, + { + .description = "" + } } }, - { "bilinear", "Bilinear filtering", CONFIG_BINARY, "", 1 }, - { "dithering", "Dithering", CONFIG_BINARY, "", 1 }, - { "", "", -1 } + { + .name = "bilinear", + .description = "Bilinear filtering", + .type = CONFIG_BINARY, + .default_int = 1 + }, + { + .name = "dithering", + .description = "Dithering", + .type = CONFIG_BINARY, + .default_int = 1 + }, + { + .type = CONFIG_END + } }; const device_t s3_virge_325_pci_device = { diff --git a/src/video/vid_sigma.c b/src/video/vid_sigma.c index bddce455c..a6372ad00 100644 --- a/src/video/vid_sigma.c +++ b/src/video/vid_sigma.c @@ -880,39 +880,103 @@ sigma_speed_changed(void *p) sigma_recalctimings(sigma); } - device_config_t sigma_config[] = { // clang-format off { - "rgb_type", "RGB type", CONFIG_SELECTION, "", 0, "", { 0 }, - { - { "Color", 0 }, - { "Green Monochrome", 1 }, - { "Amber Monochrome", 2 }, - { "Gray Monochrome", 3 }, - { "Color (no brown)", 4 }, - { "" } + .name = "rgb_type", + .description = "RGB type", + .type = CONFIG_SELECTION, + .default_int = 0, + .selection = { + { + .description = "Color", + .value = 0 + }, + { + .description = "Green Monochrome", + .value = 1 + }, + { + .description = "Amber Monochrome", + .value = 2 + }, + { + .description = "Gray Monochrome", + .value = 3 + }, + { + .description = "Color (no brown)", + .value = 4 + }, + { + .description = "" + } } }, - { "enable_nmi", "Enable NMI for CGA emulation", CONFIG_BINARY, "", 1 }, { - "bios_addr", "BIOS Address", CONFIG_HEX20, "", 0xc0000, "", { 0 }, - { - { "C000H", 0xc0000 }, - { "C800H", 0xc8000 }, - { "CC00H", 0xcc000 }, - { "D000H", 0xd0000 }, - { "D400H", 0xd4000 }, - { "D800H", 0xd8000 }, - { "DC00H", 0xdc000 }, - { "E000H", 0xe0000 }, - { "E400H", 0xe4000 }, - { "E800H", 0xe8000 }, - { "EC00H", 0xec000 }, - { "" } + .name = "enable_nmi", + .description = "Enable NMI for CGA emulation", + .type = CONFIG_BINARY, + .default_int = 1 + }, + { + .name = "bios_addr", + .description = "BIOS Address", + .type = CONFIG_HEX20, + .default_int = 0xc0000, + .selection = { + { + .description = "C000H", + .value = 0xc0000 + }, + { + .description = "C800H", + .value = 0xc8000 + }, + { + .description = "CC00H", + .value = 0xcc000 + }, + { + .description = "D000H", + .value = 0xd0000 + }, + { + .description = "D400H", + .value = 0xd4000 + }, + { + .description = "D800H", + .value = 0xd8000 + }, + { + .description = "DC00H", + .value = 0xdc000 + }, + { + .description = "E000H", + .value = 0xe0000 + }, + { + .description = "E400H", + .value = 0xe4000 + }, + { + .description = "E800H", + .value = 0xe8000 + }, + { + .description = "EC00H", + .value = 0xec000 + }, + { + .description = "" + } }, }, - { "", "", -1 } + { + .type = CONFIG_END + } // clang-format on }; diff --git a/src/video/vid_table.c b/src/video/vid_table.c index ccd9c4071..a4374796d 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -47,31 +47,31 @@ static video_timings_t timing_default = {VIDEO_ISA, 8, 16, 32, 8, 16, 32}; static int was_reset = 0; - static const device_t vid_none_device = { - "None", - "none", - 0, - 0, - NULL, - NULL, - NULL, - { NULL }, - NULL, - NULL, - NULL + .name = "None", + .internal_name = "none", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; static const device_t vid_internal_device = { - "Internal", - "internal", - 0, - 0, - NULL, - NULL, NULL, - { NULL }, - NULL, - NULL, - NULL + .name = "Internal", + .internal_name = "internal", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; static const VIDEO_CARD diff --git a/src/video/vid_tgui9440.c b/src/video/vid_tgui9440.c index c6eb5ff8c..9cf7e1ff7 100644 --- a/src/video/vid_tgui9440.c +++ b/src/video/vid_tgui9440.c @@ -3193,7 +3193,7 @@ static const device_config_t tgui9440_config[] = { .default_int = 2 }, { - .type = -1 + .type = CONFIG_END } }; @@ -3222,7 +3222,7 @@ static const device_config_t tgui96xx_config[] = { .default_int = 4 }, { - .type = -1 + .type = CONFIG_END } }; // clang-format on diff --git a/src/video/vid_tvga.c b/src/video/vid_tvga.c index 6842ea362..8d488552e 100644 --- a/src/video/vid_tvga.c +++ b/src/video/vid_tvga.c @@ -446,16 +446,32 @@ void tvga_force_redraw(void *p) static const device_config_t tvga_config[] = { // clang-format off { - "memory", "Memory size", CONFIG_SELECTION, "", 1024, "", { 0 }, - { - { "256 kB", 256 }, - { "512 kB", 512 }, - { "1 MB", 1024 }, + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 1024, + .selection = { + { + .description = "256 kB", + .value = 256 + }, + { + .description = "512 kB", + .value = 512 + }, + { + .description = "1 MB", + .value = 1024 + }, /*Chip supports 2mb, but drivers are buggy*/ - { "" } + { + .description = "" + } } }, - { "", "", -1 } + { + .type = CONFIG_END + } // clang-format off }; diff --git a/src/video/vid_voodoo.c b/src/video/vid_voodoo.c index 76e6c4009..7631dcf8f 100644 --- a/src/video/vid_voodoo.c +++ b/src/video/vid_voodoo.c @@ -1418,22 +1418,22 @@ static const device_config_t voodoo_config[] = { }, #endif { - .type = -1 + .type = CONFIG_END } // clang-format on }; const device_t voodoo_device = { - "3DFX Voodoo Graphics", - "voodoo", - DEVICE_PCI, - 0, - voodoo_init, - voodoo_close, - NULL, - { NULL }, - voodoo_speed_changed, - voodoo_force_blit, - voodoo_config + .name = "3DFX Voodoo Graphics", + .internal_name = "voodoo", + .flags = DEVICE_PCI, + .local = 0, + .init = voodoo_init, + .close = voodoo_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = voodoo_speed_changed, + .force_redraw = voodoo_force_blit, + .config = voodoo_config }; diff --git a/src/video/vid_voodoo_banshee.c b/src/video/vid_voodoo_banshee.c index b314cc152..48d14a5b6 100644 --- a/src/video/vid_voodoo_banshee.c +++ b/src/video/vid_voodoo_banshee.c @@ -2601,8 +2601,7 @@ static void banshee_pci_write(int func, int addr, uint8_t val, void *p) } // clang-format off -static const device_config_t banshee_sgram_config[] = -{ +static const device_config_t banshee_sgram_config[] = { { .name = "memory", .description = "Memory size", @@ -2672,12 +2671,11 @@ static const device_config_t banshee_sgram_config[] = }, #endif { - .type = -1 + .type = CONFIG_END } }; -static const device_config_t banshee_sdram_config[] = -{ +static const device_config_t banshee_sdram_config[] = { { .name = "bilinear", .description = "Bilinear filtering", @@ -2728,7 +2726,7 @@ static const device_config_t banshee_sdram_config[] = }, #endif { - .type = -1 + .type = CONFIG_END } }; // clang-format on @@ -2954,123 +2952,114 @@ static void banshee_force_redraw(void *p) banshee->svga.fullchange = changeframecount; } - -const device_t voodoo_banshee_device = -{ - "3dfx Voodoo Banshee", - "voodoo_banshee_pci", - DEVICE_PCI, - 0, - banshee_init, - banshee_close, - NULL, - { banshee_available }, - banshee_speed_changed, - banshee_force_redraw, - banshee_sgram_config +const device_t voodoo_banshee_device = { + .name = "3dfx Voodoo Banshee", + .internal_name = "voodoo_banshee_pci", + .flags = DEVICE_PCI, + .local = 0, + .init = banshee_init, + .close = banshee_close, + .reset = NULL, + { .available = banshee_available }, + .speed_changed = banshee_speed_changed, + .force_redraw = banshee_force_redraw, + banshee_sgram_config }; -const device_t creative_voodoo_banshee_device = -{ - "Creative 3D Blaster Banshee", - "ctl3d_banshee_pci", - DEVICE_PCI, - 0, - creative_banshee_init, - banshee_close, - NULL, - { creative_banshee_available }, - banshee_speed_changed, - banshee_force_redraw, - banshee_sdram_config +const device_t creative_voodoo_banshee_device = { + .name = "Creative 3D Blaster Banshee", + .internal_name = "ctl3d_banshee_pci", + .flags = DEVICE_PCI, + .local = 0, + .init = creative_banshee_init, + .close = banshee_close, + .reset = NULL, + { .available = creative_banshee_available }, + .speed_changed = banshee_speed_changed, + .force_redraw = banshee_force_redraw, + banshee_sdram_config }; -const device_t voodoo_3_2000_device = -{ - "3dfx Voodoo3 2000", - "voodoo3_2k_pci", - DEVICE_PCI, - 0, - v3_2000_init, - banshee_close, - NULL, - { v3_2000_available }, - banshee_speed_changed, - banshee_force_redraw, - banshee_sdram_config +const device_t voodoo_3_2000_device = { + .name = "3dfx Voodoo3 2000", + .internal_name = "voodoo3_2k_pci", + .flags = DEVICE_PCI, + .local = 0, + .init = v3_2000_init, + .close = banshee_close, + .reset = NULL, + { .available = v3_2000_available }, + .speed_changed = banshee_speed_changed, + .force_redraw = banshee_force_redraw, + banshee_sdram_config }; -const device_t voodoo_3_2000_agp_device = -{ - "3dfx Voodoo3 2000", - "voodoo3_2k_agp", - DEVICE_AGP, - 0, - v3_2000_agp_init, - banshee_close, - NULL, - { v3_2000_agp_available }, - banshee_speed_changed, - banshee_force_redraw, - banshee_sdram_config +const device_t voodoo_3_2000_agp_device = { + .name = "3dfx Voodoo3 2000", + .internal_name = "voodoo3_2k_agp", + .flags = DEVICE_AGP, + .local = 0, + .init = v3_2000_agp_init, + .close = banshee_close, + .reset = NULL, + { .available = v3_2000_agp_available }, + .speed_changed = banshee_speed_changed, + .force_redraw = banshee_force_redraw, + banshee_sdram_config }; -const device_t voodoo_3_2000_agp_onboard_8m_device = -{ - "3dfx Voodoo3 2000 (On-Board 8MB SGRAM)", - "voodoo3_2k_agp_onboard_8m", - DEVICE_AGP, - 8, - v3_2000_agp_onboard_init, - banshee_close, - NULL, - { NULL }, - banshee_speed_changed, - banshee_force_redraw, - banshee_sdram_config +const device_t voodoo_3_2000_agp_onboard_8m_device = { + .name = "3dfx Voodoo3 2000 (On-Board 8MB SGRAM)", + .internal_name = "voodoo3_2k_agp_onboard_8m", + .flags = DEVICE_AGP, + .local = 8, + .init = v3_2000_agp_onboard_init, + .close = banshee_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = banshee_speed_changed, + .force_redraw = banshee_force_redraw, + banshee_sdram_config }; -const device_t voodoo_3_3000_device = -{ - "3dfx Voodoo3 3000", - "voodoo3_3k_pci", - DEVICE_PCI, - 0, - v3_3000_init, - banshee_close, - NULL, - { v3_3000_available }, - banshee_speed_changed, - banshee_force_redraw, - banshee_sdram_config +const device_t voodoo_3_3000_device = { + .name = "3dfx Voodoo3 3000", + .internal_name = "voodoo3_3k_pci", + .flags = DEVICE_PCI, + .local = 0, + .init = v3_3000_init, + .close = banshee_close, + .reset = NULL, + { .available = v3_3000_available }, + .speed_changed = banshee_speed_changed, + .force_redraw = banshee_force_redraw, + banshee_sdram_config }; -const device_t voodoo_3_3000_agp_device = -{ - "3dfx Voodoo3 3000", - "voodoo3_3k_agp", - DEVICE_AGP, - 0, - v3_3000_agp_init, - banshee_close, - NULL, - { v3_3000_agp_available }, - banshee_speed_changed, - banshee_force_redraw, - banshee_sdram_config +const device_t voodoo_3_3000_agp_device = { + .name = "3dfx Voodoo3 3000", + .internal_name = "voodoo3_3k_agp", + .flags = DEVICE_AGP, + .local = 0, + .init = v3_3000_agp_init, + .close = banshee_close, + .reset = NULL, + { .available = v3_3000_agp_available }, + .speed_changed = banshee_speed_changed, + .force_redraw = banshee_force_redraw, + banshee_sdram_config }; -const device_t velocity_100_agp_device = -{ - "3dfx Velocity 100", - "velocity100_agp", - DEVICE_AGP, - 0, - velocity_100_agp_init, - banshee_close, - NULL, - { velocity_100_available }, - banshee_speed_changed, - banshee_force_redraw, - banshee_sdram_config +const device_t velocity_100_agp_device = { + .name = "3dfx Velocity 100", + .internal_name = "velocity100_agp", + .flags = DEVICE_AGP, + .local = 0, + .init = velocity_100_agp_init, + .close = banshee_close, + .reset = NULL, + { .available = velocity_100_available }, + .speed_changed = banshee_speed_changed, + .force_redraw = banshee_force_redraw, + banshee_sdram_config }; From cc88e5eef18e422cb07980a475d054c111da83b1 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 12 Apr 2022 19:46:23 -0400 Subject: [PATCH 31/78] A few missed bits of cleanup --- src/floppy/fdc_magitronic.c | 2 +- src/mac/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/floppy/fdc_magitronic.c b/src/floppy/fdc_magitronic.c index ba9e9a580..2250c9a4b 100644 --- a/src/floppy/fdc_magitronic.c +++ b/src/floppy/fdc_magitronic.c @@ -127,7 +127,7 @@ static const device_config_t b215_config[] = { { .description = "" } } }, - { "", "", -1 } + { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/mac/CMakeLists.txt b/src/mac/CMakeLists.txt index aa0fdd8b5..2fdc2363a 100644 --- a/src/mac/CMakeLists.txt +++ b/src/mac/CMakeLists.txt @@ -50,4 +50,4 @@ set_target_properties(86Box #set(XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES") #set(XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-") -#set(XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${CMAKE_CURRENT_SOURCE_DIR}/mac/codesign/dev/app.entitlements) \ No newline at end of file +#set(XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${CMAKE_CURRENT_SOURCE_DIR}/mac/codesign/dev/app.entitlements) From 65b680a4ef802648500c03e7139f9aa3b2293e73 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 12 Apr 2022 19:46:48 -0400 Subject: [PATCH 32/78] Bump version to 3.4 in preperation for release --- CMakeLists.txt | 2 +- src/include_make/86box/version.h | 6 +++--- src/unix/assets/86Box.spec | 2 +- vcpkg.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c7d22365..4f19818a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ if(MUNT_EXTERNAL) endif() project(86Box - VERSION 3.3 + VERSION 3.4 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 1dc91bfeb..8bf418791 100644 --- a/src/include_make/86box/version.h +++ b/src/include_make/86box/version.h @@ -20,11 +20,11 @@ #define EMU_NAME "86Box" #define EMU_NAME_W LSTR(EMU_NAME) -#define EMU_VERSION "3.3" +#define EMU_VERSION "3.4" #define EMU_VERSION_W LSTR(EMU_VERSION) -#define EMU_VERSION_EX "3.30" +#define EMU_VERSION_EX "3.40" #define EMU_VERSION_MAJ 3 -#define EMU_VERSION_MIN 3 +#define EMU_VERSION_MIN 4 #define EMU_VERSION_PATCH 0 #define EMU_BUILD_NUM 0 diff --git a/src/unix/assets/86Box.spec b/src/unix/assets/86Box.spec index 8db7b6854..4809db3e8 100644 --- a/src/unix/assets/86Box.spec +++ b/src/unix/assets/86Box.spec @@ -15,7 +15,7 @@ %global romver 20220319 Name: 86Box -Version: 3.3 +Version: 3.4 Release: 1%{?dist} Summary: Classic PC emulator License: GPLv2+ diff --git a/vcpkg.json b/vcpkg.json index 920dc07e6..495ac2eac 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "86box", - "version-string": "3.3", + "version-string": "3.4", "homepage": "https://86box.net/", "documentation": "http://86box.readthedocs.io/", "license": "GPL-2.0-or-later", From 3a40d9a8071d4f10c80f9bd75a67e34090323cd2 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 13 Apr 2022 02:03:48 +0200 Subject: [PATCH 33/78] Phase 1. --- src/cpu/386_dynarec.c | 5 + src/cpu/386_dynarec_ops.c | 4 + src/cpu/x86_ops_rep_dyn.h | 703 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 712 insertions(+) create mode 100644 src/cpu/x86_ops_rep_dyn.h diff --git a/src/cpu/386_dynarec.c b/src/cpu/386_dynarec.c index e9a187216..978865255 100644 --- a/src/cpu/386_dynarec.c +++ b/src/cpu/386_dynarec.c @@ -33,6 +33,11 @@ #include "codegen_backend.h" #endif #endif + +#ifndef IS_DYNAREC +#define IS_DYNAREC +#endif + #include "386_common.h" #if defined(__APPLE__) && defined(__aarch64__) diff --git a/src/cpu/386_dynarec_ops.c b/src/cpu/386_dynarec_ops.c index 28fd3ec79..256a06726 100644 --- a/src/cpu/386_dynarec_ops.c +++ b/src/cpu/386_dynarec_ops.c @@ -24,6 +24,10 @@ #define CPU_BLOCK_END() cpu_block_end = 1 +#ifdef IS_DYNAREC +#undef IS_DYNAREC +#endif + #include "386_common.h" diff --git a/src/cpu/x86_ops_rep_dyn.h b/src/cpu/x86_ops_rep_dyn.h new file mode 100644 index 000000000..e63ed32fe --- /dev/null +++ b/src/cpu/x86_ops_rep_dyn.h @@ -0,0 +1,703 @@ +#define REP_OPS(size, CNT_REG, SRC_REG, DEST_REG) \ +static int opREP_INSB_ ## size(uint32_t fetchdat) \ +{ \ + addr64 = 0x00000000; \ + \ + if (CNT_REG > 0) \ + { \ + uint8_t temp; \ + \ + SEG_CHECK_WRITE(&cpu_state.seg_es); \ + check_io_perm(DX); \ + CHECK_WRITE(&cpu_state.seg_es, DEST_REG, DEST_REG); \ + high_page = 0; \ + do_mmut_wb(es, DEST_REG, &addr64); \ + if (cpu_state.abrt) return 1; \ + temp = inb(DX); \ + writememb_n(es, DEST_REG, addr64, temp); if (cpu_state.abrt) return 1; \ + \ + if (cpu_state.flags & D_FLAG) DEST_REG--; \ + else DEST_REG++; \ + CNT_REG--; \ + cycles -= 15; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_INSW_ ## size(uint32_t fetchdat) \ +{ \ + addr64a[0] = addr64a[1] = 0x00000000; \ + \ + if (CNT_REG > 0) \ + { \ + uint16_t temp; \ + \ + SEG_CHECK_WRITE(&cpu_state.seg_es); \ + check_io_perm(DX); \ + check_io_perm(DX+1); \ + CHECK_WRITE(&cpu_state.seg_es, DEST_REG, DEST_REG + 1UL); \ + high_page = 0; \ + do_mmut_ww(es, DEST_REG, addr64a); \ + if (cpu_state.abrt) return 1; \ + temp = inw(DX); \ + writememw_n(es, DEST_REG, addr64a, temp); if (cpu_state.abrt) return 1; \ + \ + if (cpu_state.flags & D_FLAG) DEST_REG -= 2; \ + else DEST_REG += 2; \ + CNT_REG--; \ + cycles -= 15; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_INSL_ ## size(uint32_t fetchdat) \ +{ \ + addr64a[0] = addr64a[1] = addr64a[2] = addr64a[3] = 0x00000000; \ + \ + if (CNT_REG > 0) \ + { \ + uint32_t temp; \ + \ + SEG_CHECK_WRITE(&cpu_state.seg_es); \ + check_io_perm(DX); \ + check_io_perm(DX+1); \ + check_io_perm(DX+2); \ + check_io_perm(DX+3); \ + CHECK_WRITE(&cpu_state.seg_es, DEST_REG, DEST_REG + 3UL); \ + high_page = 0; \ + do_mmut_wl(es, DEST_REG, addr64a); \ + if (cpu_state.abrt) return 1; \ + temp = inl(DX); \ + writememl_n(es, DEST_REG, addr64a, temp); if (cpu_state.abrt) return 1; \ + \ + if (cpu_state.flags & D_FLAG) DEST_REG -= 4; \ + else DEST_REG += 4; \ + CNT_REG--; \ + cycles -= 15; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ + \ +static int opREP_OUTSB_ ## size(uint32_t fetchdat) \ +{ \ + if (CNT_REG > 0) \ + { \ + uint8_t temp; \ + SEG_CHECK_READ(cpu_state.ea_seg); \ + CHECK_READ(cpu_state.ea_seg, SRC_REG, SRC_REG); \ + temp = readmemb(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \ + check_io_perm(DX); \ + outb(DX, temp); \ + if (cpu_state.flags & D_FLAG) SRC_REG--; \ + else SRC_REG++; \ + CNT_REG--; \ + cycles -= 14; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_OUTSW_ ## size(uint32_t fetchdat) \ +{ \ + if (CNT_REG > 0) \ + { \ + uint16_t temp; \ + SEG_CHECK_READ(cpu_state.ea_seg); \ + CHECK_READ(cpu_state.ea_seg, SRC_REG, SRC_REG + 1UL); \ + temp = readmemw(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \ + check_io_perm(DX); \ + check_io_perm(DX+1); \ + outw(DX, temp); \ + if (cpu_state.flags & D_FLAG) SRC_REG -= 2; \ + else SRC_REG += 2; \ + CNT_REG--; \ + cycles -= 14; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_OUTSL_ ## size(uint32_t fetchdat) \ +{ \ + if (CNT_REG > 0) \ + { \ + uint32_t temp; \ + SEG_CHECK_READ(cpu_state.ea_seg); \ + CHECK_READ(cpu_state.ea_seg, SRC_REG, SRC_REG + 3UL); \ + temp = readmeml(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \ + check_io_perm(DX); \ + check_io_perm(DX+1); \ + check_io_perm(DX+2); \ + check_io_perm(DX+3); \ + outl(DX, temp); \ + if (cpu_state.flags & D_FLAG) SRC_REG -= 4; \ + else SRC_REG += 4; \ + CNT_REG--; \ + cycles -= 14; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ + \ +static int opREP_MOVSB_ ## size(uint32_t fetchdat) \ +{ \ + int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \ + addr64 = addr64_2 = 0x00000000; \ + if (trap) \ + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \ + if (CNT_REG > 0) \ + { \ + SEG_CHECK_READ(cpu_state.ea_seg); \ + SEG_CHECK_WRITE(&cpu_state.seg_es); \ + } \ + while (CNT_REG > 0) \ + { \ + uint8_t temp; \ + \ + CHECK_READ_REP(cpu_state.ea_seg, SRC_REG, SRC_REG); \ + high_page = 0; \ + do_mmut_rb(cpu_state.ea_seg->base, SRC_REG, &addr64) ; \ + if (cpu_state.abrt) break; \ + CHECK_WRITE_REP(&cpu_state.seg_es, DEST_REG, DEST_REG); \ + do_mmut_wb(es, DEST_REG, &addr64_2); \ + if (cpu_state.abrt) break; \ + temp = readmemb_n(cpu_state.ea_seg->base, SRC_REG, addr64); if (cpu_state.abrt) return 1; \ + writememb_n(es, DEST_REG, addr64_2, temp); if (cpu_state.abrt) return 1; \ + \ + if (cpu_state.flags & D_FLAG) { DEST_REG--; SRC_REG--; } \ + else { DEST_REG++; SRC_REG++; } \ + CNT_REG--; \ + cycles -= is486 ? 3 : 4; \ + if (cycles < cycles_end) \ + break; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_MOVSW_ ## size(uint32_t fetchdat) \ +{ \ + int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \ + addr64a[0] = addr64a[1] = 0x00000000; \ + addr64a_2[0] = addr64a_2[1] = 0x00000000; \ + if (trap) \ + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \ + if (CNT_REG > 0) \ + { \ + SEG_CHECK_READ(cpu_state.ea_seg); \ + SEG_CHECK_WRITE(&cpu_state.seg_es); \ + } \ + while (CNT_REG > 0) \ + { \ + uint16_t temp; \ + \ + CHECK_READ_REP(cpu_state.ea_seg, SRC_REG, SRC_REG + 1UL); \ + high_page = 0; \ + do_mmut_rw(cpu_state.ea_seg->base, SRC_REG, addr64a); \ + if (cpu_state.abrt) break; \ + CHECK_WRITE_REP(&cpu_state.seg_es, DEST_REG, DEST_REG + 1UL); \ + do_mmut_ww(es, DEST_REG, addr64a_2); \ + if (cpu_state.abrt) break; \ + temp = readmemw_n(cpu_state.ea_seg->base, SRC_REG, addr64a); if (cpu_state.abrt) return 1; \ + writememw_n(es, DEST_REG, addr64a_2, temp); if (cpu_state.abrt) return 1; \ + \ + if (cpu_state.flags & D_FLAG) { DEST_REG -= 2; SRC_REG -= 2; } \ + else { DEST_REG += 2; SRC_REG += 2; } \ + CNT_REG--; \ + cycles -= is486 ? 3 : 4; \ + if (cycles < cycles_end) \ + break; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_MOVSL_ ## size(uint32_t fetchdat) \ +{ \ + int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \ + addr64a[0] = addr64a[1] = addr64a[2] = addr64a[3] = 0x00000000; \ + addr64a_2[0] = addr64a_2[1] = addr64a_2[2] = addr64a_2[3] = 0x00000000; \ + if (trap) \ + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \ + if (CNT_REG > 0) \ + { \ + SEG_CHECK_READ(cpu_state.ea_seg); \ + SEG_CHECK_WRITE(&cpu_state.seg_es); \ + } \ + while (CNT_REG > 0) \ + { \ + uint32_t temp; \ + \ + CHECK_READ_REP(cpu_state.ea_seg, SRC_REG, SRC_REG + 3UL); \ + high_page = 0; \ + do_mmut_rl(cpu_state.ea_seg->base, SRC_REG, addr64a); \ + if (cpu_state.abrt) break; \ + CHECK_WRITE_REP(&cpu_state.seg_es, DEST_REG, DEST_REG + 3UL); \ + do_mmut_wl(es, DEST_REG, addr64a_2); \ + if (cpu_state.abrt) break; \ + temp = readmeml_n(cpu_state.ea_seg->base, SRC_REG, addr64a); if (cpu_state.abrt) return 1; \ + writememl_n(es, DEST_REG, addr64a_2, temp); if (cpu_state.abrt) return 1; \ + \ + if (cpu_state.flags & D_FLAG) { DEST_REG -= 4; SRC_REG -= 4; } \ + else { DEST_REG += 4; SRC_REG += 4; } \ + CNT_REG--; \ + cycles -= is486 ? 3 : 4; \ + if (cycles < cycles_end) \ + break; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ + \ + \ +static int opREP_STOSB_ ## size(uint32_t fetchdat) \ +{ \ + int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \ + if (trap) \ + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \ + if (CNT_REG > 0) \ + SEG_CHECK_WRITE(&cpu_state.seg_es); \ + while (CNT_REG > 0) \ + { \ + CHECK_WRITE_REP(&cpu_state.seg_es, DEST_REG, DEST_REG); \ + writememb(es, DEST_REG, AL); if (cpu_state.abrt) return 1; \ + if (cpu_state.flags & D_FLAG) DEST_REG--; \ + else DEST_REG++; \ + CNT_REG--; \ + cycles -= is486 ? 4 : 5; \ + if (cycles < cycles_end) \ + break; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_STOSW_ ## size(uint32_t fetchdat) \ +{ \ + int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \ + if (trap) \ + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \ + if (CNT_REG > 0) \ + SEG_CHECK_WRITE(&cpu_state.seg_es); \ + while (CNT_REG > 0) \ + { \ + CHECK_WRITE_REP(&cpu_state.seg_es, DEST_REG, DEST_REG + 1UL); \ + writememw(es, DEST_REG, AX); if (cpu_state.abrt) return 1; \ + if (cpu_state.flags & D_FLAG) DEST_REG -= 2; \ + else DEST_REG += 2; \ + CNT_REG--; \ + cycles -= is486 ? 4 : 5; \ + if (cycles < cycles_end) \ + break; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_STOSL_ ## size(uint32_t fetchdat) \ +{ \ + int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \ + if (trap) \ + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \ + if (CNT_REG > 0) \ + SEG_CHECK_WRITE(&cpu_state.seg_es); \ + while (CNT_REG > 0) \ + { \ + CHECK_WRITE_REP(&cpu_state.seg_es, DEST_REG, DEST_REG + 3UL); \ + writememl(es, DEST_REG, EAX); if (cpu_state.abrt) return 1; \ + if (cpu_state.flags & D_FLAG) DEST_REG -= 4; \ + else DEST_REG += 4; \ + CNT_REG--; \ + cycles -= is486 ? 4 : 5; \ + if (cycles < cycles_end) \ + break; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ + \ +static int opREP_LODSB_ ## size(uint32_t fetchdat) \ +{ \ + int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \ + if (trap) \ + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \ + if (CNT_REG > 0) \ + SEG_CHECK_READ(cpu_state.ea_seg); \ + while (CNT_REG > 0) \ + { \ + CHECK_READ_REP(cpu_state.ea_seg, SRC_REG, SRC_REG); \ + AL = readmemb(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \ + if (cpu_state.flags & D_FLAG) SRC_REG--; \ + else SRC_REG++; \ + CNT_REG--; \ + cycles -= is486 ? 4 : 5; \ + if (cycles < cycles_end) \ + break; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_LODSW_ ## size(uint32_t fetchdat) \ +{ \ + int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \ + if (trap) \ + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \ + if (CNT_REG > 0) \ + SEG_CHECK_READ(cpu_state.ea_seg); \ + while (CNT_REG > 0) \ + { \ + CHECK_READ_REP(cpu_state.ea_seg, SRC_REG, SRC_REG + 1UL); \ + AX = readmemw(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \ + if (cpu_state.flags & D_FLAG) SRC_REG -= 2; \ + else SRC_REG += 2; \ + CNT_REG--; \ + cycles -= is486 ? 4 : 5; \ + if (cycles < cycles_end) \ + break; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_LODSL_ ## size(uint32_t fetchdat) \ +{ \ + int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \ + if (trap) \ + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \ + if (CNT_REG > 0) \ + SEG_CHECK_READ(cpu_state.ea_seg); \ + while (CNT_REG > 0) \ + { \ + CHECK_READ_REP(cpu_state.ea_seg, SRC_REG, SRC_REG + 3UL); \ + EAX = readmeml(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \ + if (cpu_state.flags & D_FLAG) SRC_REG -= 4; \ + else SRC_REG += 4; \ + CNT_REG--; \ + cycles -= is486 ? 4 : 5; \ + if (cycles < cycles_end) \ + break; \ + } \ + if (CNT_REG > 0) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ + + +#define CHEK_READ(a, b, c) + + +#define REP_OPS_CMPS_SCAS(size, CNT_REG, SRC_REG, DEST_REG, FV) \ +static int opREP_CMPSB_ ## size(uint32_t fetchdat) \ +{ \ + int tempz; \ + \ + addr64 = addr64_2 = 0x00000000; \ + \ + tempz = FV; \ + if ((CNT_REG > 0) && (FV == tempz)) \ + { \ + uint8_t temp, temp2; \ + SEG_CHECK_READ(cpu_state.ea_seg); \ + SEG_CHECK_READ(&cpu_state.seg_es); \ + CHECK_READ(cpu_state.ea_seg, SRC_REG, SRC_REG); \ + high_page = uncached = 0; \ + do_mmut_rb(cpu_state.ea_seg->base, SRC_REG, &addr64); \ + if (cpu_state.abrt) return 1; \ + CHECK_READ(&cpu_state.seg_es, DEST_REG, DEST_REG); \ + do_mmut_rb2(es, DEST_REG, &addr64_2); \ + if (cpu_state.abrt) return 1; \ + temp = readmemb_n(cpu_state.ea_seg->base, SRC_REG, addr64); if (cpu_state.abrt) return 1; \ + if (uncached) \ + readlookup2[(uint32_t)(es+DEST_REG)>>12] = old_rl2; \ + temp2 = readmemb_n(es, DEST_REG, addr64_2); if (cpu_state.abrt) return 1; \ + if (uncached) \ + readlookup2[(uint32_t)(es+DEST_REG)>>12] = (uintptr_t) LOOKUP_INV; \ + \ + if (cpu_state.flags & D_FLAG) { DEST_REG--; SRC_REG--; } \ + else { DEST_REG++; SRC_REG++; } \ + CNT_REG--; \ + cycles -= is486 ? 7 : 9; \ + setsub8(temp, temp2); \ + tempz = (ZF_SET()) ? 1 : 0; \ + } \ + if ((CNT_REG > 0) && (FV == tempz)) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_CMPSW_ ## size(uint32_t fetchdat) \ +{ \ + int tempz; \ + \ + addr64a[0] = addr64a[1] = 0x00000000; \ + addr64a_2[0] = addr64a_2[1] = 0x00000000; \ + \ + tempz = FV; \ + if ((CNT_REG > 0) && (FV == tempz)) \ + { \ + uint16_t temp, temp2; \ + SEG_CHECK_READ(cpu_state.ea_seg); \ + SEG_CHECK_READ(&cpu_state.seg_es); \ + CHECK_READ(cpu_state.ea_seg, SRC_REG, SRC_REG + 1UL); \ + high_page = uncached = 0; \ + do_mmut_rw(cpu_state.ea_seg->base, SRC_REG, addr64a); \ + if (cpu_state.abrt) return 1; \ + CHECK_READ(&cpu_state.seg_es, DEST_REG, DEST_REG + 1UL); \ + do_mmut_rw2(es, DEST_REG, addr64a_2); \ + if (cpu_state.abrt) return 1; \ + temp = readmemw_n(cpu_state.ea_seg->base, SRC_REG, addr64a); if (cpu_state.abrt) return 1; \ + if (uncached) \ + readlookup2[(uint32_t)(es+DEST_REG)>>12] = old_rl2; \ + temp2 = readmemw_n(es, DEST_REG, addr64a_2); if (cpu_state.abrt) return 1; \ + if (uncached) \ + readlookup2[(uint32_t)(es+DEST_REG)>>12] = (uintptr_t) LOOKUP_INV; \ + \ + if (cpu_state.flags & D_FLAG) { DEST_REG -= 2; SRC_REG -= 2; } \ + else { DEST_REG += 2; SRC_REG += 2; } \ + CNT_REG--; \ + cycles -= is486 ? 7 : 9; \ + setsub16(temp, temp2); \ + tempz = (ZF_SET()) ? 1 : 0; \ + } \ + if ((CNT_REG > 0) && (FV == tempz)) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_CMPSL_ ## size(uint32_t fetchdat) \ +{ \ + int tempz; \ + \ + addr64a[0] = addr64a[1] = addr64a[2] = addr64a[3] = 0x00000000; \ + addr64a_2[0] = addr64a_2[1] = addr64a_2[2] = addr64a_2[3] = 0x00000000; \ + \ + tempz = FV; \ + if ((CNT_REG > 0) && (FV == tempz)) \ + { \ + uint32_t temp, temp2; \ + SEG_CHECK_READ(cpu_state.ea_seg); \ + SEG_CHECK_READ(&cpu_state.seg_es); \ + CHECK_READ(cpu_state.ea_seg, SRC_REG, SRC_REG + 3UL); \ + high_page = uncached = 0; \ + do_mmut_rl(cpu_state.ea_seg->base, SRC_REG, addr64a); \ + if (cpu_state.abrt) return 1; \ + CHECK_READ(&cpu_state.seg_es, DEST_REG, DEST_REG + 3UL); \ + do_mmut_rl2(es, DEST_REG, addr64a_2); \ + if (cpu_state.abrt) return 1; \ + temp = readmeml_n(cpu_state.ea_seg->base, SRC_REG, addr64a); if (cpu_state.abrt) return 1; \ + if (uncached) \ + readlookup2[(uint32_t)(es+DEST_REG)>>12] = old_rl2; \ + temp2 = readmeml_n(es, DEST_REG, addr64a_2); if (cpu_state.abrt) return 1; \ + if (uncached) \ + readlookup2[(uint32_t)(es+DEST_REG)>>12] = (uintptr_t) LOOKUP_INV; \ + \ + if (cpu_state.flags & D_FLAG) { DEST_REG -= 4; SRC_REG -= 4; } \ + else { DEST_REG += 4; SRC_REG += 4; } \ + CNT_REG--; \ + cycles -= is486 ? 7 : 9; \ + setsub32(temp, temp2); \ + tempz = (ZF_SET()) ? 1 : 0; \ + } \ + if ((CNT_REG > 0) && (FV == tempz)) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ + \ +static int opREP_SCASB_ ## size(uint32_t fetchdat) \ +{ \ + int tempz; \ + int cycles_end = cycles - 1000; \ + if (trap) \ + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \ + tempz = FV; \ + if ((CNT_REG > 0) && (FV == tempz)) \ + SEG_CHECK_READ(&cpu_state.seg_es); \ + while ((CNT_REG > 0) && (FV == tempz)) \ + { \ + CHECK_READ_REP(&cpu_state.seg_es, DEST_REG, DEST_REG); \ + uint8_t temp = readmemb(es, DEST_REG); if (cpu_state.abrt) break;\ + setsub8(AL, temp); \ + tempz = (ZF_SET()) ? 1 : 0; \ + if (cpu_state.flags & D_FLAG) DEST_REG--; \ + else DEST_REG++; \ + CNT_REG--; \ + cycles -= is486 ? 5 : 8; \ + if (cycles < cycles_end) \ + break; \ + } \ + if ((CNT_REG > 0) && (FV == tempz)) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_SCASW_ ## size(uint32_t fetchdat) \ +{ \ + int tempz; \ + int cycles_end = cycles - 1000; \ + if (trap) \ + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \ + tempz = FV; \ + if ((CNT_REG > 0) && (FV == tempz)) \ + SEG_CHECK_READ(&cpu_state.seg_es); \ + while ((CNT_REG > 0) && (FV == tempz)) \ + { \ + CHECK_READ_REP(&cpu_state.seg_es, DEST_REG, DEST_REG + 1UL); \ + uint16_t temp = readmemw(es, DEST_REG); if (cpu_state.abrt) break;\ + setsub16(AX, temp); \ + tempz = (ZF_SET()) ? 1 : 0; \ + if (cpu_state.flags & D_FLAG) DEST_REG -= 2; \ + else DEST_REG += 2; \ + CNT_REG--; \ + cycles -= is486 ? 5 : 8; \ + if (cycles < cycles_end) \ + break; \ + } \ + if ((CNT_REG > 0) && (FV == tempz)) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} \ +static int opREP_SCASL_ ## size(uint32_t fetchdat) \ +{ \ + int tempz; \ + int cycles_end = cycles - 1000; \ + if (trap) \ + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ \ + tempz = FV; \ + if ((CNT_REG > 0) && (FV == tempz)) \ + SEG_CHECK_READ(&cpu_state.seg_es); \ + while ((CNT_REG > 0) && (FV == tempz)) \ + { \ + CHECK_READ_REP(&cpu_state.seg_es, DEST_REG, DEST_REG + 3UL); \ + uint32_t temp = readmeml(es, DEST_REG); if (cpu_state.abrt) break;\ + setsub32(EAX, temp); \ + tempz = (ZF_SET()) ? 1 : 0; \ + if (cpu_state.flags & D_FLAG) DEST_REG -= 4; \ + else DEST_REG += 4; \ + CNT_REG--; \ + cycles -= is486 ? 5 : 8; \ + if (cycles < cycles_end) \ + break; \ + } \ + if ((CNT_REG > 0) && (FV == tempz)) \ + { \ + CPU_BLOCK_END(); \ + cpu_state.pc = cpu_state.oldpc; \ + return 1; \ + } \ + return cpu_state.abrt; \ +} + +REP_OPS(a16, CX, SI, DI) +REP_OPS(a32, ECX, ESI, EDI) +REP_OPS_CMPS_SCAS(a16_NE, CX, SI, DI, 0) +REP_OPS_CMPS_SCAS(a16_E, CX, SI, DI, 1) +REP_OPS_CMPS_SCAS(a32_NE, ECX, ESI, EDI, 0) +REP_OPS_CMPS_SCAS(a32_E, ECX, ESI, EDI, 1) + +static int opREPNE(uint32_t fetchdat) +{ + fetchdat = fastreadl(cs + cpu_state.pc); + if (cpu_state.abrt) return 1; + cpu_state.pc++; + + CLOCK_CYCLES(2); + if (x86_opcodes_REPNE[(fetchdat & 0xff) | cpu_state.op32]) + return x86_opcodes_REPNE[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8); + return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8); +} +static int opREPE(uint32_t fetchdat) +{ + fetchdat = fastreadl(cs + cpu_state.pc); + if (cpu_state.abrt) return 1; + cpu_state.pc++; + + CLOCK_CYCLES(2); + if (x86_opcodes_REPE[(fetchdat & 0xff) | cpu_state.op32]) + return x86_opcodes_REPE[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8); + return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8); +} From ba40831002241b2ea9704b2a253dad40da7d458c Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 13 Apr 2022 02:07:23 +0200 Subject: [PATCH 34/78] Phase 2. --- src/cpu/386_ops.h | 4 +++ src/cpu/x86_ops_bitscan.h | 54 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/src/cpu/386_ops.h b/src/cpu/386_ops.h index 4518be9a9..790216cb9 100644 --- a/src/cpu/386_ops.h +++ b/src/cpu/386_ops.h @@ -195,7 +195,11 @@ extern void x386_dynarec_log(const char *fmt, ...); #include "x86_ops_mul.h" #include "x86_ops_pmode.h" #include "x86_ops_prefix.h" +#ifdef IS_DYNAREC +#include "x86_ops_rep_dyn.h" +#else #include "x86_ops_rep.h" +#endif #include "x86_ops_ret.h" #include "x86_ops_set.h" #include "x86_ops_stack.h" diff --git a/src/cpu/x86_ops_bitscan.h b/src/cpu/x86_ops_bitscan.h index 36ae1058e..5b94e96e2 100644 --- a/src/cpu/x86_ops_bitscan.h +++ b/src/cpu/x86_ops_bitscan.h @@ -1,3 +1,24 @@ +#ifdef IS_DYNAREC +#define BS_common(start, end, dir, dest, time) \ + flags_rebuild(); \ + if (temp) \ + { \ + int c; \ + cpu_state.flags &= ~Z_FLAG; \ + for (c = start; c != end; c += dir) \ + { \ + CLOCK_CYCLES(time); \ + instr_cycles += time; \ + if (temp & (1 << c)) \ + { \ + dest = c; \ + break; \ + } \ + } \ + } \ + else \ + cpu_state.flags |= Z_FLAG; +#else #define BS_common(start, end, dir, dest, time) \ flags_rebuild(); \ instr_cycles = 0; \ @@ -18,11 +39,14 @@ } \ else \ cpu_state.flags |= Z_FLAG; +#endif static int opBSF_w_a16(uint32_t fetchdat) { uint16_t temp; +#ifndef IS_DYNAREC int instr_cycles = 0; +#endif fetch_ea_16(fetchdat); if (cpu_mod != 3) @@ -32,14 +56,18 @@ static int opBSF_w_a16(uint32_t fetchdat) BS_common(0, 16, 1, cpu_state.regs[cpu_reg].w, (is486) ? 1 : 3); CLOCK_CYCLES((is486) ? 6 : 10); +#ifndef IS_DYNAREC instr_cycles += ((is486) ? 6 : 10); PREFETCH_RUN(instr_cycles, 2, rmdat, (cpu_mod == 3) ? 0:1,0,0,0, 0); +#enif return 0; } static int opBSF_w_a32(uint32_t fetchdat) { uint16_t temp; +#ifndef IS_DYNAREC int instr_cycles = 0; +#endif fetch_ea_32(fetchdat); if (cpu_mod != 3) @@ -49,14 +77,18 @@ static int opBSF_w_a32(uint32_t fetchdat) BS_common(0, 16, 1, cpu_state.regs[cpu_reg].w, (is486) ? 1 : 3); CLOCK_CYCLES((is486) ? 6 : 10); +#ifndef IS_DYNAREC instr_cycles += ((is486) ? 6 : 10); PREFETCH_RUN(instr_cycles, 2, rmdat, (cpu_mod == 3) ? 0:1,0,0,0, 1); +#endif return 0; } static int opBSF_l_a16(uint32_t fetchdat) { uint32_t temp; +#ifndef IS_DYNAREC int instr_cycles = 0; +#endif fetch_ea_16(fetchdat); if (cpu_mod != 3) @@ -66,14 +98,18 @@ static int opBSF_l_a16(uint32_t fetchdat) BS_common(0, 32, 1, cpu_state.regs[cpu_reg].l, (is486) ? 1 : 3); CLOCK_CYCLES((is486) ? 6 : 10); +#ifndef IS_DYNAREC instr_cycles += ((is486) ? 6 : 10); PREFETCH_RUN(instr_cycles, 2, rmdat, 0,(cpu_mod == 3) ? 0:1,0,0, 0); +#endif return 0; } static int opBSF_l_a32(uint32_t fetchdat) { uint32_t temp; +#ifndef IS_DYNAREC int instr_cycles = 0; +#endif fetch_ea_32(fetchdat); if (cpu_mod != 3) @@ -83,15 +119,19 @@ static int opBSF_l_a32(uint32_t fetchdat) BS_common(0, 32, 1, cpu_state.regs[cpu_reg].l, (is486) ? 1 : 3); CLOCK_CYCLES((is486) ? 6 : 10); +#ifndef IS_DYNAREC instr_cycles += ((is486) ? 6 : 10); PREFETCH_RUN(instr_cycles, 2, rmdat, 0,(cpu_mod == 3) ? 0:1,0,0, 1); +#endif return 0; } static int opBSR_w_a16(uint32_t fetchdat) { uint16_t temp; +#ifndef IS_DYNAREC int instr_cycles = 0; +#endif fetch_ea_16(fetchdat); if (cpu_mod != 3) @@ -101,14 +141,18 @@ static int opBSR_w_a16(uint32_t fetchdat) BS_common(15, -1, -1, cpu_state.regs[cpu_reg].w, 3); CLOCK_CYCLES((is486) ? 6 : 10); +#ifndef IS_DYNAREC instr_cycles += ((is486) ? 6 : 10); PREFETCH_RUN(instr_cycles, 2, rmdat, (cpu_mod == 3) ? 0:1,0,0,0, 0); +#endif return 0; } static int opBSR_w_a32(uint32_t fetchdat) { uint16_t temp; +#ifndef IS_DYNAREC int instr_cycles = 0; +#endif fetch_ea_32(fetchdat); if (cpu_mod != 3) @@ -118,14 +162,18 @@ static int opBSR_w_a32(uint32_t fetchdat) BS_common(15, -1, -1, cpu_state.regs[cpu_reg].w, 3); CLOCK_CYCLES((is486) ? 6 : 10); +#ifndef IS_DYNAREC instr_cycles += ((is486) ? 6 : 10); PREFETCH_RUN(instr_cycles, 2, rmdat, (cpu_mod == 3) ? 0:1,0,0,0, 1); +#endif return 0; } static int opBSR_l_a16(uint32_t fetchdat) { uint32_t temp; +#ifndef IS_DYNAREC int instr_cycles = 0; +#enif fetch_ea_16(fetchdat); if (cpu_mod != 3) @@ -135,14 +183,18 @@ static int opBSR_l_a16(uint32_t fetchdat) BS_common(31, -1, -1, cpu_state.regs[cpu_reg].l, 3); CLOCK_CYCLES((is486) ? 6 : 10); +#ifndef IS_DYNAREC instr_cycles += ((is486) ? 6 : 10); PREFETCH_RUN(instr_cycles, 2, rmdat, 0,(cpu_mod == 3) ? 0:1,0,0, 0); +#endif return 0; } static int opBSR_l_a32(uint32_t fetchdat) { uint32_t temp; +#ifndef IS_DYNAREC int instr_cycles = 0; +#endif fetch_ea_32(fetchdat); if (cpu_mod != 3) @@ -152,7 +204,9 @@ static int opBSR_l_a32(uint32_t fetchdat) BS_common(31, -1, -1, cpu_state.regs[cpu_reg].l, 3); CLOCK_CYCLES((is486) ? 6 : 10); +#ifndef IS_DYNAREC instr_cycles += ((is486) ? 6 : 10); PREFETCH_RUN(instr_cycles, 2, rmdat, 0,(cpu_mod == 3) ? 0:1,0,0, 1); +#enif return 0; } From c5208af2a67c5856a96688246220ba77f3a06334 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 13 Apr 2022 02:10:13 +0200 Subject: [PATCH 35/78] Fixed some compile-breaking mistakes in x86_ops_bitscan.h. --- src/cpu/x86_ops_bitscan.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cpu/x86_ops_bitscan.h b/src/cpu/x86_ops_bitscan.h index 5b94e96e2..7e906a2a0 100644 --- a/src/cpu/x86_ops_bitscan.h +++ b/src/cpu/x86_ops_bitscan.h @@ -59,7 +59,7 @@ static int opBSF_w_a16(uint32_t fetchdat) #ifndef IS_DYNAREC instr_cycles += ((is486) ? 6 : 10); PREFETCH_RUN(instr_cycles, 2, rmdat, (cpu_mod == 3) ? 0:1,0,0,0, 0); -#enif +#endif return 0; } static int opBSF_w_a32(uint32_t fetchdat) @@ -173,7 +173,7 @@ static int opBSR_l_a16(uint32_t fetchdat) uint32_t temp; #ifndef IS_DYNAREC int instr_cycles = 0; -#enif +#endif fetch_ea_16(fetchdat); if (cpu_mod != 3) @@ -207,6 +207,6 @@ static int opBSR_l_a32(uint32_t fetchdat) #ifndef IS_DYNAREC instr_cycles += ((is486) ? 6 : 10); PREFETCH_RUN(instr_cycles, 2, rmdat, 0,(cpu_mod == 3) ? 0:1,0,0, 1); -#enif +#endif return 0; } From 1c271f6f8a8525b23b5e3a9fbeca281ed3ed633a Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 13 Apr 2022 02:12:08 +0200 Subject: [PATCH 36/78] And fixed one last warning, which finishes this CPU warning fix process. --- src/cpu/x86_ops_bitscan.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cpu/x86_ops_bitscan.h b/src/cpu/x86_ops_bitscan.h index 7e906a2a0..af87a545d 100644 --- a/src/cpu/x86_ops_bitscan.h +++ b/src/cpu/x86_ops_bitscan.h @@ -8,7 +8,6 @@ for (c = start; c != end; c += dir) \ { \ CLOCK_CYCLES(time); \ - instr_cycles += time; \ if (temp & (1 << c)) \ { \ dest = c; \ From 1f144f188571fed21d9e384fa182380e1a10cffc Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 13 Apr 2022 02:47:37 +0200 Subject: [PATCH 37/78] Fixed some #define's, as pointed out by lemondrops. --- src/cpu/386_dynarec.c | 4 ++-- src/cpu/386_dynarec_ops.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cpu/386_dynarec.c b/src/cpu/386_dynarec.c index 978865255..46674fbc6 100644 --- a/src/cpu/386_dynarec.c +++ b/src/cpu/386_dynarec.c @@ -34,8 +34,8 @@ #endif #endif -#ifndef IS_DYNAREC -#define IS_DYNAREC +#ifdef IS_DYNAREC +#undef IS_DYNAREC #endif #include "386_common.h" diff --git a/src/cpu/386_dynarec_ops.c b/src/cpu/386_dynarec_ops.c index 256a06726..0b02676f8 100644 --- a/src/cpu/386_dynarec_ops.c +++ b/src/cpu/386_dynarec_ops.c @@ -24,8 +24,8 @@ #define CPU_BLOCK_END() cpu_block_end = 1 -#ifdef IS_DYNAREC -#undef IS_DYNAREC +#ifndef IS_DYNAREC +#define IS_DYNAREC #endif #include "386_common.h" From bd8b58b5e9007ac9c27f3f15d80bb2aba2d6f95f Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 14 Apr 2022 00:18:58 +0200 Subject: [PATCH 38/78] Fixed the warnings in the SC1184x RAMDAC code. --- src/video/vid_sc1148x_ramdac.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/video/vid_sc1148x_ramdac.c b/src/video/vid_sc1148x_ramdac.c index fcd314743..202147d14 100644 --- a/src/video/vid_sc1148x_ramdac.c +++ b/src/video/vid_sc1148x_ramdac.c @@ -42,12 +42,11 @@ void sc1148x_ramdac_out(uint16_t addr, int rs2, uint8_t val, void *p, svga_t *svga) { sc1148x_ramdac_t *ramdac = (sc1148x_ramdac_t *) p; - uint8_t rs = (addr & 0x03); - rs |= ((!!rs2) << 2); - int oldbpp = 0; + uint8_t rs = (addr & 0x03) | ((!!rs2) << 2); + int oldbpp = 0; - switch (addr) { - case 0x3c6: + switch (rs) { + case 2: case 6: switch (ramdac->state) { case 4: ramdac->state = 0; @@ -84,8 +83,7 @@ sc1148x_ramdac_out(uint16_t addr, int rs2, uint8_t val, void *p, svga_t *svga) } break; - case 0x3c7: case 0x3c8: - case 0x3c9: + default: ramdac->state = 0; svga_out(addr, val, svga); break; @@ -97,12 +95,10 @@ uint8_t sc1148x_ramdac_in(uint16_t addr, int rs2, void *p, svga_t *svga) { sc1148x_ramdac_t *ramdac = (sc1148x_ramdac_t *) p; - uint8_t ret = 0xff; - uint8_t rs = (addr & 0x03); - rs |= ((!!rs2) << 2); + uint8_t ret = 0xff, rs = (addr & 0x03) | ((!!rs2) << 2); - switch (addr) { - case 0x3c6: + switch (rs) { + case 2: case 6: switch (ramdac->state) { case 1: case 2: case 3: @@ -120,8 +116,7 @@ sc1148x_ramdac_in(uint16_t addr, int rs2, void *p, svga_t *svga) } break; - case 0x3c7: case 0x3c8: - case 0x3c9: + default: ret = svga_in(addr, svga); ramdac->state = 0; break; From a66d381be93f0a324156b464d22d6576726edb96 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 7 Apr 2022 05:23:23 +0500 Subject: [PATCH 39/78] Convert a false positive warning suppression in the Voodoo dynarec code into a pragma --- src/include/86box/vid_voodoo_codegen_x86-64.h | 5 +++++ src/include/86box/vid_voodoo_codegen_x86.h | 5 +++++ src/video/CMakeLists.txt | 6 ------ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/include/86box/vid_voodoo_codegen_x86-64.h b/src/include/86box/vid_voodoo_codegen_x86-64.h index fa973c5ff..632eacfb4 100644 --- a/src/include/86box/vid_voodoo_codegen_x86-64.h +++ b/src/include/86box/vid_voodoo_codegen_x86-64.h @@ -20,6 +20,11 @@ #define LOD_MASK (LOD_TMIRROR_S | LOD_TMIRROR_T) +/* Suppress a false positive warning on gcc that causes excessive build log spam */ +#if __GNUC__ >= 10 +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif + typedef struct voodoo_x86_data_t { uint8_t code_block[BLOCK_SIZE]; diff --git a/src/include/86box/vid_voodoo_codegen_x86.h b/src/include/86box/vid_voodoo_codegen_x86.h index e1afdd163..6bde2c0c6 100644 --- a/src/include/86box/vid_voodoo_codegen_x86.h +++ b/src/include/86box/vid_voodoo_codegen_x86.h @@ -20,6 +20,11 @@ #define LOD_MASK (LOD_TMIRROR_S | LOD_TMIRROR_T) +/* Suppress a false positive warning on gcc that causes excessive build log spam */ +#if __GNUC__ >= 10 +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif + typedef struct voodoo_x86_data_t { uint8_t code_block[BLOCK_SIZE]; diff --git a/src/video/CMakeLists.txt b/src/video/CMakeLists.txt index b3182afe8..3e1ffcc71 100644 --- a/src/video/CMakeLists.txt +++ b/src/video/CMakeLists.txt @@ -47,9 +47,3 @@ add_library(voodoo OBJECT vid_voodoo.c vid_voodoo_banshee.c if(NOT MSVC AND (ARCH STREQUAL "i386" OR ARCH STREQUAL "x86_64")) target_compile_options(voodoo PRIVATE "-msse2") endif() - -# Suppress GCC false positive warnings in vid_voodoo_codegen_x86[-64].h -# that cause ~3000 lines to be output into the logs each time -if(CMAKE_C_COMPILER_ID STREQUAL "GNU") - target_compile_options(voodoo PRIVATE "-Wstringop-overflow=0") -endif() From 97b6d5741260444bd47d946f627a18413af04aa4 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 7 Apr 2022 05:23:51 +0500 Subject: [PATCH 40/78] Remove an obsolete TODO file --- src/qt/TODO | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/qt/TODO diff --git a/src/qt/TODO b/src/qt/TODO deleted file mode 100644 index a8b0b4970..000000000 --- a/src/qt/TODO +++ /dev/null @@ -1 +0,0 @@ -* Joystick support From 355250216f4ca028492b05933d5420fee92f6425 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Tue, 12 Apr 2022 15:26:16 +0500 Subject: [PATCH 41/78] Move the Compaq Deskpro 386 to the Dev branch --- CMakeLists.txt | 1 + src/include/86box/machine.h | 2 ++ src/machine/CMakeLists.txt | 4 ++++ src/machine/m_at_compaq.c | 2 ++ src/machine/machine_table.c | 2 ++ src/win/Makefile.mingw | 10 ++++++++++ 6 files changed, 21 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f19818a8..39e378b3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,6 +141,7 @@ option(QT "Qt GUI" # ------ ----------- ---- --------- --------- cmake_dependent_option(AMD_K5 "AMD K5" ON "DEV_BRANCH" OFF) cmake_dependent_option(CYRIX_6X86 "Cyrix 6x86" ON "DEV_BRANCH" OFF) +cmake_dependent_option(DESKPRO386 "Compaq Deskpro 386" ON "DEV_BRANCH" OFF) cmake_dependent_option(GUSMAX "Gravis UltraSound MAX" ON "DEV_BRANCH" OFF) cmake_dependent_option(ISAMEM_RAMPAGE "AST Rampage" ON "DEV_BRANCH" OFF) cmake_dependent_option(ISAMEM_IAB "Intel Above Board" ON "DEV_BRANCH" OFF) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 45043ebc3..18cfb882f 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -514,7 +514,9 @@ extern int machine_at_cmdpc_init(const machine_t *); extern int machine_at_portableii_init(const machine_t *); extern int machine_at_portableiii_init(const machine_t *); extern int machine_at_portableiii386_init(const machine_t *); +#if defined(DEV_BRANCH) && defined(USE_DESKPRO386) extern int machine_at_deskpro386_init(const machine_t *); +#endif #ifdef EMU_DEVICE_H extern const device_t *at_cpqiii_get_device(void); #endif diff --git a/src/machine/CMakeLists.txt b/src/machine/CMakeLists.txt index f642903ae..b23a0bbf4 100644 --- a/src/machine/CMakeLists.txt +++ b/src/machine/CMakeLists.txt @@ -24,6 +24,10 @@ add_library(mch OBJECT machine.c machine_table.c m_xt.c m_xt_compaq.c m_at_sockets7.c m_at_socket8.c m_at_slot1.c m_at_slot2.c m_at_socket370.c m_at_misc.c) +if(DESKPRO386) + target_compile_definitions(mch PRIVATE USE_DESKPRO386) +endif() + if(LASERXT) target_sources(mch PRIVATE m_xt_laserxt.c) target_compile_definitions(mch PRIVATE USE_LASERXT) diff --git a/src/machine/m_at_compaq.c b/src/machine/m_at_compaq.c index 76d54286f..4f7181616 100644 --- a/src/machine/m_at_compaq.c +++ b/src/machine/m_at_compaq.c @@ -893,6 +893,7 @@ machine_at_portableiii386_init(const machine_t *model) return ret; } +#if defined(DEV_BRANCH) && defined(USE_DESKPRO386) int machine_at_deskpro386_init(const machine_t *model) { @@ -908,3 +909,4 @@ machine_at_deskpro386_init(const machine_t *model) return ret; } +#endif diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 6b4bc0a75..56314fc8b 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -384,7 +384,9 @@ const machine_t machines[] = { /* Has IBM AT KBC firmware. */ { "[C&T 386] Samsung SPC-6000A", "spc6000a", MACHINE_TYPE_386DX, MACHINE_CHIPSET_CT_386, machine_at_spc6000a_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE, 1024, 32768, 1024, 127, NULL, NULL }, /* Uses Compaq KBC firmware. */ +#if defined(DEV_BRANCH) && defined(USE_DESKPRO386) { "[ISA] Compaq Deskpro 386", "deskpro386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_DISCRETE, machine_at_deskpro386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE, 1024, 14336, 1024, 127, NULL, NULL }, +#endif { "[ISA] Compaq Portable III (386)", "portableiii386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_DISCRETE, machine_at_portableiii386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE | MACHINE_VIDEO, 1024, 14336, 1024, 127, at_cpqiii_get_device }, /* Has IBM AT KBC firmware. */ { "[ISA] Micronics 09-00021", "micronics386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_DISCRETE, machine_at_micronics386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 8192, 128, 127, NULL, NULL }, diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 325c5d5dd..0a373a131 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -40,6 +40,9 @@ ifeq ($(DEV_BUILD), y) ifndef CYRIX_6X86 CYRIX_6X86 := y endif + ifndef DESKPRO386 + DESKPRO386 := y + endif ifndef GUSMAX GUSMAX := y endif @@ -101,6 +104,9 @@ else ifndef CYRIX_6X86 CYRIX_6X86 := n endif + ifndef DESKPRO386 + DESKPRO386 := n + endif ifndef GUSMAX GUSMAX := n endif @@ -431,6 +437,10 @@ ifeq ($(CYRIX_6X86), y) OPTS += -DUSE_CYRIX_6X86 endif +ifeq ($(DESKPRO386), y) +OPTS += -DUSE_DESKPRO386 +endif + ifeq ($(GUSMAX), y) OPTS += -DUSE_GUSMAX endif From 94adafa1eef961bed5bd90472e3864435fa04c92 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Tue, 12 Apr 2022 15:31:44 +0500 Subject: [PATCH 42/78] Repalce the NO_SIO Dev branch option with AN430TX The only machine under that option, the Intel AN430TX, was actually put there for problems unrelated to Super I/O --- CMakeLists.txt | 2 +- src/include/86box/machine.h | 2 +- src/machine/CMakeLists.txt | 8 ++++---- src/machine/m_at_socket7.c | 2 +- src/machine/machine_table.c | 2 +- src/win/Makefile.mingw | 20 ++++++++++---------- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39e378b3a..ac93eefdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,6 +140,7 @@ option(QT "Qt GUI" # Option Description Def. Condition Otherwise # ------ ----------- ---- --------- --------- cmake_dependent_option(AMD_K5 "AMD K5" ON "DEV_BRANCH" OFF) +cmake_dependent_option(AN430TX "Intel AN430TX" ON "DEV_BRANCH" OFF) cmake_dependent_option(CYRIX_6X86 "Cyrix 6x86" ON "DEV_BRANCH" OFF) cmake_dependent_option(DESKPRO386 "Compaq Deskpro 386" ON "DEV_BRANCH" OFF) cmake_dependent_option(GUSMAX "Gravis UltraSound MAX" ON "DEV_BRANCH" OFF) @@ -148,7 +149,6 @@ cmake_dependent_option(ISAMEM_IAB "Intel Above Board" cmake_dependent_option(ISAMEM_BRAT "BocaRAM/AT" ON "DEV_BRANCH" OFF) cmake_dependent_option(LASERXT "VTech Laser XT" ON "DEV_BRANCH" OFF) cmake_dependent_option(MGA "Matrox Mystique graphics adapters" ON "DEV_BRANCH" OFF) -cmake_dependent_option(NO_SIO "Machines without emulated Super I/O chips" 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(PAS16 "Pro Audio Spectrum 16" ON "DEV_BRANCH" OFF) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 18cfb882f..85a287e1a 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -622,7 +622,7 @@ extern int machine_at_i430vx_init(const machine_t *); extern int machine_at_nupro592_init(const machine_t *); extern int machine_at_tx97_init(const machine_t *); -#if defined(DEV_BRANCH) && defined(NO_SIO) +#if defined(DEV_BRANCH) && defined(USE_AN430TX) extern int machine_at_an430tx_init(const machine_t *); #endif extern int machine_at_ym430tx_init(const machine_t *); diff --git a/src/machine/CMakeLists.txt b/src/machine/CMakeLists.txt index b23a0bbf4..62bd5c61f 100644 --- a/src/machine/CMakeLists.txt +++ b/src/machine/CMakeLists.txt @@ -24,6 +24,10 @@ add_library(mch OBJECT machine.c machine_table.c m_xt.c m_xt_compaq.c m_at_sockets7.c m_at_socket8.c m_at_slot1.c m_at_slot2.c m_at_socket370.c m_at_misc.c) +if(AN430TX) + target_compile_definitions(mch PRIVATE USE_AN430TX) +endif() + if(DESKPRO386) target_compile_definitions(mch PRIVATE USE_DESKPRO386) endif() @@ -33,10 +37,6 @@ if(LASERXT) target_compile_definitions(mch PRIVATE USE_LASERXT) endif() -if(NO_SIO) - target_compile_definitions(mch PRIVATE NO_SIO) -endif() - if(OPEN_AT) target_compile_definitions(mch PRIVATE USE_OPEN_AT) endif() diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index 39d872bd6..117f2cea8 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -689,7 +689,7 @@ machine_at_tx97_init(const machine_t *model) } -#if defined(DEV_BRANCH) && defined(NO_SIO) +#if defined(DEV_BRANCH) && defined(USE_AN430TX) int machine_at_an430tx_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 56314fc8b..ed6ad9f06 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -775,7 +775,7 @@ const machine_t machines[] = { { "[i430TX] ADLink NuPRO-592", "nupro592", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_nupro592_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 66666667, 66666667, 1900, 2800, 1.5, 5.5, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL }, /* This has the AMIKey KBC firmware, which is an updated 'F' type (YM430TX is based on the TX97). */ { "[i430TX] ASUS TX97", "tx97", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_tx97_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 75000000, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL }, -#if defined(DEV_BRANCH) && defined(NO_SIO) +#if defined(DEV_BRANCH) && defined(USE_AN430TX) /* This has the Phoenix MultiKey KBC firmware. */ { "[i430TX] Intel AN430TX", "an430tx", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_an430tx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 60000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL }, #endif diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 0a373a131..32584f425 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -37,6 +37,9 @@ ifeq ($(DEV_BUILD), y) ifndef AMD_K5 AMD_K5 := y endif + ifndef AN430TX + AN430TX := y + endif ifndef CYRIX_6X86 CYRIX_6X86 := y endif @@ -61,9 +64,6 @@ ifeq ($(DEV_BUILD), y) ifndef MGA MGA := y endif - ifndef NO_SIO - NO_SIO := y - endif ifndef OPEN_AT OPEN_AT := y endif @@ -101,6 +101,9 @@ else ifndef AMD_K5 AMD_K5 := n endif + ifndef AN430TX + AN430TX := n + endif ifndef CYRIX_6X86 CYRIX_6X86 := n endif @@ -125,9 +128,6 @@ else ifndef MGA MGA := n endif - ifndef NO_SIO - NO_SIO := n - endif ifndef OPEN_AT OPEN_AT := n endif @@ -433,6 +433,10 @@ ifeq ($(AMD_K5), y) OPTS += -DUSE_AMD_K5 endif +ifeq ($(AN430TX), y) +OPTS += -DUSE_AN430TX +endif + ifeq ($(CYRIX_6X86), y) OPTS += -DUSE_CYRIX_6X86 endif @@ -467,10 +471,6 @@ OPTS += -DUSE_MGA DEVBROBJ += vid_mga.o endif -ifeq ($(NO_SIO), y) -OPTS += -DNO_SIO -endif - ifeq ($(OPEN_AT), y) OPTS += -DUSE_OPEN_AT endif From 60f1f418b05a0d04164bd235b1fa607d98cf96ad Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Tue, 12 Apr 2022 15:55:33 +0500 Subject: [PATCH 43/78] Make the VNC renderer independent of the Dev branch option --- CMakeLists.txt | 2 +- src/win/Makefile.mingw | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac93eefdf..6ee62d4ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,6 +127,7 @@ option(OPENAL "OpenAL" option(RTMIDI "RtMidi" ON) option(FLUIDSYNTH "FluidSynth" ON) option(MUNT "MUNT" ON) +option(VNC "VNC renderer" OFF) option(DINPUT "DirectInput" OFF) option(CPPTHREADS "C++11 threads" ON) option(NEW_DYNAREC "Use the PCem v15 (\"new\") dynamic recompiler" OFF) @@ -155,7 +156,6 @@ cmake_dependent_option(PAS16 "Pro Audio Spectrum 16" cmake_dependent_option(SIO_DETECT "Super I/O Detection Helper" ON "DEV_BRANCH" OFF) cmake_dependent_option(TANDY_ISA "Tandy PSG ISA clone boards" ON "DEV_BRANCH" OFF) cmake_dependent_option(VGAWONDER "ATI VGA Wonder (ATI-18800)" ON "DEV_BRANCH" OFF) -cmake_dependent_option(VNC "VNC renderer" OFF "DEV_BRANCH" OFF) cmake_dependent_option(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF) # Ditto but for Qt diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 32584f425..82225dc7a 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -79,9 +79,6 @@ ifeq ($(DEV_BUILD), y) ifndef TANDY_ISA TANDY_ISA := y endif - ifndef VNC - VNC := y - endif ifndef XL24 XL24 := y endif @@ -143,9 +140,6 @@ else ifndef TANDY_ISA TANDY_ISA := n endif - ifndef VNC - VNC := n - endif ifndef XL24 XL24 := n endif @@ -188,6 +182,9 @@ endif ifndef MUNT MUNT := y endif +ifndef VNC + VNC := n +endif ifndef NEW_DYNAREC NEW_DYNAREC := n endif From eae6bd9456a46e0338c5b407d1c3f1cfb1e6d30d Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Wed, 13 Apr 2022 05:15:20 +0500 Subject: [PATCH 44/78] Set the required C standard to C11 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ee62d4ba..294f5b55d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,6 +114,7 @@ if(HAIKU) set(RTMIDI OFF) endif() +set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 11) set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON) From 4bba7f8f1d11de82f80500f174a1c2e75ecfdacf Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Wed, 13 Apr 2022 05:16:23 +0500 Subject: [PATCH 45/78] Define the FreeType library name on macOS --- src/printer/prt_escp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/printer/prt_escp.c b/src/printer/prt_escp.c index d290e295f..e5f43257c 100644 --- a/src/printer/prt_escp.c +++ b/src/printer/prt_escp.c @@ -88,6 +88,8 @@ #ifdef _WIN32 # define PATH_FREETYPE_DLL "freetype.dll" +#elif defined __APPLE__ +# define PATH_FREETYPE_DLL "libfreetype.dylib" #else # define PATH_FREETYPE_DLL "libfreetype.so.6" #endif From 818e0a843d035f35db0a8691926aa0a26496a307 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Wed, 13 Apr 2022 06:20:31 +0500 Subject: [PATCH 46/78] Remove factually incorrect info from a comment in machine_table.c The Rise R418 machine has since been re-added, and the Hedaka HED-919 has been removed for months --- src/machine/machine_table.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index ed6ad9f06..67a7b2641 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -144,7 +144,6 @@ const machine_filter_t machine_chipsets[] = { /* Machines to add before machine freeze: - PCChips M773 (440BX + SMSC with AMI BIOS); - - Rise R418 (was removed on my end, has to be re-added); - TMC Mycomp PCI54ST; - Zeos Quadtel 486. @@ -177,9 +176,6 @@ const machine_filter_t machine_chipsets[] = { respectively. Also, AMI KBC command C1, mysteriously missing from the technical references of AMI MegaKey and earlier, is Write Input Port, same as on AMIKey-3. - - Machines to remove: - - Hedaka HED-919. */ From eba088c6925cd567422d70eca5f47d8193fe8164 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Tue, 12 Apr 2022 15:58:57 +0500 Subject: [PATCH 47/78] Remove trailing whitespace + indentation consistency fixes --- src/codegen/CMakeLists.txt | 2 +- src/codegen_new/CMakeLists.txt | 2 +- src/config.c | 6 +- src/include/86box/vid_svga.h | 2 +- src/mem/rom.c | 2 +- src/qt/CMakeLists.txt | 2 +- src/qt/qt_softwarerenderer.cpp | 2 +- src/unix/macOSXGlue.m | 8 +- src/video/vid_et4000w32.c | 78 +++--- src/video/vid_s3.c | 12 +- src/video/vid_s3_virge.c | 418 ++++++++++++++++----------------- src/video/vid_svga_render.c | 222 ++++++++--------- src/win/86Box.manifest | 2 +- 13 files changed, 379 insertions(+), 379 deletions(-) diff --git a/src/codegen/CMakeLists.txt b/src/codegen/CMakeLists.txt index c5f3eef3d..416b4792a 100644 --- a/src/codegen/CMakeLists.txt +++ b/src/codegen/CMakeLists.txt @@ -23,7 +23,7 @@ if(DYNAREC) target_sources(dynarec PRIVATE codegen_x86-64.c codegen_accumulate_x86-64.c) else() - message(SEND_ERROR + message(SEND_ERROR "Dynarec is incompatible with target platform ${ARCH}") endif() diff --git a/src/codegen_new/CMakeLists.txt b/src/codegen_new/CMakeLists.txt index e9f53f4a6..a96d0b57e 100644 --- a/src/codegen_new/CMakeLists.txt +++ b/src/codegen_new/CMakeLists.txt @@ -43,7 +43,7 @@ if(DYNAREC) target_sources(dynarec PRIVATE codegen_backend_arm.c codegen_backend_arm_ops.c codegen_backend_arm_uops.c) else() - message(SEND_ERROR + message(SEND_ERROR "Dynarec is incompatible with target platform ${ARCH}") endif() diff --git a/src/config.c b/src/config.c index 4dbbb4a21..27f0fb9ee 100644 --- a/src/config.c +++ b/src/config.c @@ -2421,12 +2421,12 @@ save_machine(void) if (fpu_type == 0) config_delete_var(cat, "fpu_type"); - else + else config_set_string(cat, "fpu_type", (char *) fpu_get_internal_name(cpu_f, cpu, fpu_type)); //Write the mem_size explicitly to the setttings in order to help managers to display it without having the actual machine table - config_delete_var(cat, "mem_size"); - config_set_int(cat, "mem_size", mem_size); + config_delete_var(cat, "mem_size"); + config_set_int(cat, "mem_size", mem_size); config_set_int(cat, "cpu_use_dynarec", cpu_use_dynarec); diff --git a/src/include/86box/vid_svga.h b/src/include/86box/vid_svga.h index 1502fba2d..5109207d0 100644 --- a/src/include/86box/vid_svga.h +++ b/src/include/86box/vid_svga.h @@ -158,7 +158,7 @@ typedef struct svga_t /*Force CRTC to dword mode, regardless of CR14/CR17. Required for S3 enhanced mode*/ int force_dword_mode; - + int force_old_addr; int remap_required; diff --git a/src/mem/rom.c b/src/mem/rom.c index 2e9697801..5300e47a0 100644 --- a/src/mem/rom.c +++ b/src/mem/rom.c @@ -138,7 +138,7 @@ rom_getfile(char *fn, char *s, int size) strncpy(s, fn, size); return 1; } - + return 0; } } diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 91891087b..053cf691d 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -244,7 +244,7 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE) install_qt5_plugin("Qt${QT_MAJOR}::QMacStylePlugin" QT_PLUGINS ${prefix}) install_qt5_plugin("Qt${QT_MAJOR}::QICOPlugin" QT_PLUGINS ${prefix}) install_qt5_plugin("Qt${QT_MAJOR}::QICNSPlugin" QT_PLUGINS ${prefix}) - + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" "[Paths]\nPlugins = PlugIns\n") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" diff --git a/src/qt/qt_softwarerenderer.cpp b/src/qt/qt_softwarerenderer.cpp index a6cca1152..850e8369a 100644 --- a/src/qt/qt_softwarerenderer.cpp +++ b/src/qt/qt_softwarerenderer.cpp @@ -60,7 +60,7 @@ void SoftwareRenderer::onBlit(int buf_idx, int x, int y, int w, int h) { cur_image = buf_idx; buf_usage[(buf_idx + 1) % 2].clear(); - + source.setRect(x, y, w, h); update(); } diff --git a/src/unix/macOSXGlue.m b/src/unix/macOSXGlue.m index d23c9abb8..b170dea5f 100644 --- a/src/unix/macOSXGlue.m +++ b/src/unix/macOSXGlue.m @@ -15,12 +15,12 @@ void getDefaultROMPath(char* Path) inDomains:NSUserDomainMask]; NSURL* appSupportDir = nil; NSURL* appDirectory = nil; - + if ([possibleURLs count] >= 1) { // Use the first directory (if multiple are returned) appSupportDir = [possibleURLs objectAtIndex:0]; } - + // If a valid app support directory exists, add the // app's bundle ID to it to specify the final directory. if (appSupportDir) { @@ -29,7 +29,7 @@ void getDefaultROMPath(char* Path) appDirectory=[appDirectory URLByAppendingPathComponent:@"roms"]; } // create ~/Library/Application Support/... stuff - + NSError* theError = nil; if (![sharedFM createDirectoryAtURL:appDirectory withIntermediateDirectories:YES attributes:nil error:&theError]) @@ -37,7 +37,7 @@ void getDefaultROMPath(char* Path) // Handle the error. NSLog(@"Error creating user library rom path"); } else NSLog(@"Create user rom path sucessfull"); - + strcpy(Path,[appDirectory fileSystemRepresentation]); // return appDirectory; } diff --git a/src/video/vid_et4000w32.c b/src/video/vid_et4000w32.c index a69736d40..80c48b15f 100644 --- a/src/video/vid_et4000w32.c +++ b/src/video/vid_et4000w32.c @@ -120,7 +120,7 @@ typedef struct et4000w32p_t uint32_t base[3]; uint8_t ctrl; } mmu; - + volatile int busy; } et4000w32p_t; @@ -176,7 +176,7 @@ et4000w32p_out(uint16_t addr, uint8_t val, void *p) uint8_t old; uint32_t add2addr = 0; - if (((addr & 0xfff0) == 0x3d0 || (addr & 0xfff0) == 0x3b0) && !(svga->miscout & 1)) + if (((addr & 0xfff0) == 0x3d0 || (addr & 0xfff0) == 0x3b0) && !(svga->miscout & 1)) addr ^= 0x60; switch (addr) { @@ -318,12 +318,12 @@ et4000w32p_in(uint16_t addr, void *p) et4000w32p_t *et4000 = (et4000w32p_t *)p; svga_t *svga = &et4000->svga; - if (((addr & 0xfff0) == 0x3d0 || (addr & 0xfff0) == 0x3b0) && !(svga->miscout & 1)) + if (((addr & 0xfff0) == 0x3d0 || (addr & 0xfff0) == 0x3b0) && !(svga->miscout & 1)) addr ^= 0x60; switch (addr) { case 0x3c5: - if ((svga->seqaddr & 0xf) == 7) + if ((svga->seqaddr & 0xf) == 7) return svga->seqregs[svga->seqaddr & 0xf] | 4; break; @@ -466,7 +466,7 @@ et4000w32p_recalctimings(svga_t *svga) } et4000->adjust_cursor = 0; - + switch (svga->bpp) { case 15: case 16: svga->hdisp >>= 1; @@ -501,10 +501,10 @@ et4000w32p_recalctimings(svga_t *svga) } switch (svga->gdcreg[5] & 0x60) { - case 0x00: + case 0x00: if (et4000->rev == 5) svga->ma_latch++; - + if (svga->seqregs[1] & 8) /* Low res (320) */ svga->render = svga_render_4bpp_lowres; else @@ -674,7 +674,7 @@ et4000w32p_accel_write_fifo(et4000w32p_t *et4000, uint32_t addr, uint8_t val) et4000->acl.queued.dest_off = (et4000->acl.queued.dest_off & 0x00ff) | ((val & 0x0f) << 8); break; case 0x8e: - if (et4000->type >= ET4000W32P_REVC) + if (et4000->type >= ET4000W32P_REVC) et4000->acl.queued.pixel_depth = val & 0x30; else et4000->acl.queued.vbus = val & 0x03; @@ -747,7 +747,7 @@ et4000w32p_accel_write_fifo(et4000w32p_t *et4000, uint32_t addr, uint8_t val) } } break; - case 0xa4: + case 0xa4: et4000->acl.queued.mix_addr = (et4000->acl.queued.mix_addr & 0xFFFFFF00) | val; break; case 0xa5: @@ -829,7 +829,7 @@ et4000w32p_accel_write_mmu(et4000w32p_t *et4000, uint32_t addr, uint8_t val, uin et4000->acl.cpu_input_num = 0; } - + if ((et4000->acl.internal.ctrl_routing & 7) == 4) /*CPU data is X Count*/ et4000w32_blit(val | (et4000->acl.queued.count_x << 8), 0, 0, 0xffffffff, et4000); if ((et4000->acl.internal.ctrl_routing & 7) == 5) /*CPU data is Y Count*/ @@ -863,7 +863,7 @@ et4000w32p_mmu_write(uint32_t addr, uint8_t val, void *p) et4000w32p_accel_write_fifo(et4000, addr & 0x7fff, val); } else { switch (addr & 0xff) { - case 0x00: + case 0x00: et4000->mmu.base[0] = (et4000->mmu.base[0] & 0x3fff00) | val; break; case 0x01: @@ -911,7 +911,7 @@ et4000w32p_mmu_read(uint32_t addr, void *p) et4000w32p_t *et4000 = (et4000w32p_t *)p; svga_t *svga = &et4000->svga; uint8_t temp; - + switch (addr & 0x6000) { case 0x0000: /* MMU 0 */ case 0x2000: /* MMU 1 */ @@ -933,7 +933,7 @@ et4000w32p_mmu_read(uint32_t addr, void *p) if ((addr & 0x1fff) + et4000->mmu.base[et4000->bank] >= svga->vram_max) return 0xff; - + return svga->vram[(addr & 0x1fff) + et4000->mmu.base[et4000->bank]]; case 0x6000: @@ -1001,8 +1001,8 @@ et4000w32p_mmu_read(uint32_t addr, void *p) return et4000->acl.internal.dest_off & 0xff; case 0x8d: return et4000->acl.internal.dest_off >> 8; - case 0x8e: - if (et4000->type >= ET4000W32P_REVC) + case 0x8e: + if (et4000->type >= ET4000W32P_REVC) return et4000->acl.internal.pixel_depth; else return et4000->acl.internal.vbus; @@ -1036,7 +1036,7 @@ et4000w32_blit_start(et4000w32p_t *et4000) { et4000->acl.x_count = et4000->acl.internal.count_x; et4000->acl.y_count = et4000->acl.internal.count_y; - + et4000->acl.pattern_addr = et4000->acl.internal.pattern_addr; et4000->acl.source_addr = et4000->acl.internal.source_addr; et4000->acl.dest_addr = et4000->acl.internal.dest_addr; @@ -1098,9 +1098,9 @@ et4000w32p_blit_start(et4000w32p_t *et4000) et4000->acl.internal.pos_x = et4000->acl.internal.pos_y = 0; et4000->acl.pattern_x = et4000->acl.source_x = et4000->acl.pattern_y = et4000->acl.source_y = 0; et4000->acl.status |= ACL_XYST; - + et4000w32_log("ACL status XYST set\n"); - if ((!(et4000->acl.internal.ctrl_routing & 7) || (et4000->acl.internal.ctrl_routing & 4)) && !(et4000->acl.internal.ctrl_routing & 0x40)) + if ((!(et4000->acl.internal.ctrl_routing & 7) || (et4000->acl.internal.ctrl_routing & 4)) && !(et4000->acl.internal.ctrl_routing & 0x40)) et4000->acl.status |= ACL_SSO; if (et4000w32_wrap_x[et4000->acl.internal.pattern_wrap & 7]) { @@ -1497,7 +1497,7 @@ et4000w32_blit(int count, int cpu_input, uint32_t src_dat, uint32_t mix_dat, et4 /*Write the data*/ svga->vram[et4000->acl.dest_addr & et4000->vram_mask] = out; svga->changedvram[(et4000->acl.dest_addr & et4000->vram_mask) >> 12] = changeframecount; - + if (et4000->acl.internal.xy_dir & 1) { et4000->acl.dest_addr--; et4000->acl.pattern_x--; @@ -1515,7 +1515,7 @@ et4000w32_blit(int count, int cpu_input, uint32_t src_dat, uint32_t mix_dat, et4 if (et4000->acl.source_x >= (et4000w32_wrap_x[et4000->acl.internal.source_wrap & 7] + 1)) et4000->acl.source_x -= (et4000w32_wrap_x[et4000->acl.internal.source_wrap & 7] + 1); } - + et4000->acl.x_count--; if (et4000->acl.x_count == 0xffff) { et4000->acl.x_count = et4000->acl.internal.count_x; @@ -1604,14 +1604,14 @@ et4000w32p_blit(int count, uint32_t mix, uint32_t sdat, int cpu_input, et4000w32 et4000w32_log("%06X %02X ", et4000->acl.mix_addr, svga->vram[(et4000->acl.mix_addr >> 3) & et4000->vram_mask]); } else { mixdat = mix & 1; - mix >>= 1; + mix >>= 1; mix |= 0x80000000; } et4000->acl.mix_addr++; rop = mixdat ? et4000->acl.internal.rop_fg : et4000->acl.internal.rop_bg; - + ROPMIX(rop, dest, pattern, source, out); - + et4000w32_log("%06X = %02X\n", et4000->acl.dest_addr & et4000->vram_mask, out); if (!(et4000->acl.internal.ctrl_routing & 0x40)) { svga->vram[et4000->acl.dest_addr & et4000->vram_mask] = out; @@ -1627,9 +1627,9 @@ et4000w32p_blit(int count, uint32_t mix, uint32_t sdat, int cpu_input, et4000w32 if (et4000->acl.internal.xy_dir & 1) et4000w32_decx(1, et4000); else et4000w32_incx(1, et4000); } else { - if (et4000->acl.internal.xy_dir & 1) + if (et4000->acl.internal.xy_dir & 1) et4000w32_incx((et4000->acl.internal.pixel_depth >> 4) & 3, et4000); - else + else et4000w32_decx((et4000->acl.internal.pixel_depth >> 4) & 3, et4000); et4000->acl.pix_pos = 0; @@ -1692,15 +1692,15 @@ et4000w32p_blit(int count, uint32_t mix, uint32_t sdat, int cpu_input, et4000w32 sdat >>= 8; } else source = svga->vram[(et4000->acl.source_addr + et4000->acl.source_x) & et4000->vram_mask]; - + dest = svga->vram[et4000->acl.dest_addr & et4000->vram_mask]; out = 0; - + if ((et4000->acl.internal.ctrl_routing & 0xa) == 8) { mixdat = svga->vram[(et4000->acl.mix_addr >> 3) & et4000->vram_mask] & (1 << (et4000->acl.mix_addr & 7)); } else { mixdat = mix & 1; - mix >>= 1; + mix >>= 1; mix |= 0x80000000; } @@ -1708,7 +1708,7 @@ et4000w32p_blit(int count, uint32_t mix, uint32_t sdat, int cpu_input, et4000w32 ROPMIX(rop, dest, pattern, source, out); - if (!(et4000->acl.internal.ctrl_routing & 0x40)) { + if (!(et4000->acl.internal.ctrl_routing & 0x40)) { svga->vram[et4000->acl.dest_addr & et4000->vram_mask] = out; svga->changedvram[(et4000->acl.dest_addr & et4000->vram_mask) >> 12] = changeframecount; } else { @@ -1720,7 +1720,7 @@ et4000w32p_blit(int count, uint32_t mix, uint32_t sdat, int cpu_input, et4000w32 et4000w32_decx(1, et4000); else et4000w32_incx(1, et4000); - + et4000->acl.x_count--; if (et4000->acl.x_count == 0xffff) { if (et4000->acl.internal.xy_dir & 2) { @@ -1748,7 +1748,7 @@ et4000w32p_blit(int count, uint32_t mix, uint32_t sdat, int cpu_input, et4000w32 return; if (et4000->acl.internal.ctrl_routing & 0x40) { - if (et4000->acl.cpu_dat_pos & 3) + if (et4000->acl.cpu_dat_pos & 3) et4000->acl.cpu_dat_pos += 4 - (et4000->acl.cpu_dat_pos & 3); return; } @@ -1770,7 +1770,7 @@ et4000w32p_hwcursor_draw(svga_t *svga, int displine) int minus_width = 0; uint8_t dat; offset = svga->hwcursor_latch.xoff; - + if (et4000->type == ET4000W32) { switch (svga->bpp) { case 8: @@ -1916,12 +1916,12 @@ et4000w32p_pci_write(int func, int addr, uint8_t val, void *p) et4000w32p_recalcmapping(et4000); break; - case 0x13: - et4000->linearbase &= 0x00c00000; + case 0x13: + et4000->linearbase &= 0x00c00000; et4000->linearbase |= (et4000->pci_regs[0x13] << 24); svga->crtc[0x30] &= 3; svga->crtc[0x30] |= ((et4000->linearbase & 0x3f000000) >> 22); - et4000w32p_recalcmapping(et4000); + et4000w32p_recalcmapping(et4000); break; case 0x30: case 0x31: case 0x32: case 0x33: @@ -1954,7 +1954,7 @@ et4000w32p_init(const device_t *info) et4000->pci = (info->flags & DEVICE_PCI) ? 0x80 : 0x00; et4000->vlb = (info->flags & DEVICE_VLB) ? 0x40 : 0x00; - + /*The ET4000/W32i ISA BIOS seems to not support 2MB of VRAM*/ if ((info->local == ET4000W32) || ((info->local == ET4000W32I) && !(et4000->vlb))) vram_size = 1; @@ -1986,14 +1986,14 @@ et4000w32p_init(const device_t *info) case ET4000W32: /* ET4000/W32 */ et4000->rev = 0; - + rom_init(&et4000->bios_rom, BIOS_ROM_PATH_W32, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); et4000->svga.ramdac = device_add(&tseng_ics5301_ramdac_device); et4000->svga.clock_gen = et4000->svga.ramdac; et4000->svga.getclock = sdac_getclock; - break; + break; case ET4000W32I: /* ET4000/W32i rev B */ @@ -2001,7 +2001,7 @@ et4000w32p_init(const device_t *info) if (et4000->vlb) { rom_init(&et4000->bios_rom, BIOS_ROM_PATH_W32I_VLB, 0xc0000, 0x8000, 0x7fff, 0, - MEM_MAPPING_EXTERNAL); + MEM_MAPPING_EXTERNAL); } else { rom_init(&et4000->bios_rom, BIOS_ROM_PATH_W32I_ISA, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index 23184560d..ba86de08a 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -406,7 +406,7 @@ dword_remap(svga_t *svga, uint32_t in_addr) { if (svga->packed_chain4 || svga->force_old_addr) return in_addr; - + return ((in_addr << 2) & 0x3fff0) | ((in_addr >> 14) & 0xc) | (in_addr & ~0x3fffc); @@ -415,8 +415,8 @@ static __inline uint32_t dword_remap_w(svga_t *svga, uint32_t in_addr) { if (svga->packed_chain4 || svga->force_old_addr) - return in_addr; - + return in_addr; + return ((in_addr << 2) & 0x1fff8) | ((in_addr >> 14) & 0x6) | (in_addr & ~0x1fffe); @@ -425,8 +425,8 @@ static __inline uint32_t dword_remap_l(svga_t *svga, uint32_t in_addr) { if (svga->packed_chain4 || svga->force_old_addr) - return in_addr; - + return in_addr; + return ((in_addr << 2) & 0xfffc) | ((in_addr >> 14) & 0x3) | (in_addr & ~0xffff); @@ -3379,7 +3379,7 @@ s3_updatemapping(s3_t *s3) } else { if (s3->chip >= S3_TRIO64V) svga->fb_only = 0; - + mem_mapping_disable(&s3->linear_mapping); } diff --git a/src/video/vid_s3_virge.c b/src/video/vid_s3_virge.c index 0e9f5d66c..9aa5b0973 100644 --- a/src/video/vid_s3_virge.c +++ b/src/video/vid_s3_virge.c @@ -117,10 +117,10 @@ typedef struct s3d_t { uint32_t cmd_set; int clip_l, clip_r, clip_t, clip_b; - + uint32_t dest_base; uint32_t dest_str; - + uint32_t z_base; uint32_t z_str; @@ -136,14 +136,14 @@ typedef struct s3d_t int32_t TdWdX, TdWdY; uint32_t tws; - + int32_t TdDdX, TdDdY; uint32_t tds; - + int16_t TdGdX, TdBdX, TdRdX, TdAdX; int16_t TdGdY, TdBdY, TdRdY, TdAdY; uint32_t tgs, tbs, trs, tas; - + uint32_t TdXdY12; uint32_t txend12; uint32_t TdXdY01; @@ -161,9 +161,9 @@ typedef struct virge_t mem_mapping_t linear_mapping; mem_mapping_t mmio_mapping; mem_mapping_t new_mmio_mapping; - + rom_t bios_rom; - + svga_t svga; uint8_t bank; @@ -195,7 +195,7 @@ typedef struct virge_t uint32_t hwc_fg_col, hwc_bg_col; int hwc_col_stack_pos; - + struct { uint32_t src_base; @@ -212,21 +212,21 @@ typedef struct virge_t int r_width, r_height; int rsrc_x, rsrc_y; int rdest_x, rdest_y; - + int lxend0, lxend1; int32_t ldx; uint32_t lxstart, lystart; int lycnt; int line_dir; - + int src_x, src_y; int dest_x, dest_y; int w, h; uint8_t rop; - + int data_left_count; uint32_t data_left; - + uint32_t pattern_8[8*8]; uint32_t pattern_16[8*8]; uint32_t pattern_24[8*8]; @@ -240,14 +240,14 @@ typedef struct virge_t uint32_t pycnt; uint32_t dest_l, dest_r; } s3d; - + s3d_t s3d_tri; s3d_t s3d_buffer[RB_SIZE]; int s3d_read_idx, s3d_write_idx; int s3d_busy; int render_idx; - + struct { uint32_t pri_ctrl; @@ -273,9 +273,9 @@ typedef struct virge_t uint32_t pri_size; uint32_t sec_start; uint32_t sec_size; - + int sdif; - + int pri_x, pri_y, pri_w, pri_h; int sec_x, sec_y, sec_w, sec_h; } streams; @@ -285,7 +285,7 @@ typedef struct virge_t uint32_t dma_ptr; uint64_t blitter_time; volatile int fifo_slot; - + pc_timer_t tri_timer; int virge_busy, local; @@ -297,7 +297,7 @@ typedef struct virge_t uint8_t serialport; void *i2c, *ddc; - + int waiting; } virge_t; @@ -324,29 +324,29 @@ enum { CMD_SET_AE = 1, CMD_SET_HC = (1 << 1), - + CMD_SET_FORMAT_MASK = (7 << 2), CMD_SET_FORMAT_8 = (0 << 2), CMD_SET_FORMAT_16 = (1 << 2), CMD_SET_FORMAT_24 = (2 << 2), - + CMD_SET_MS = (1 << 6), CMD_SET_IDS = (1 << 7), CMD_SET_MP = (1 << 8), CMD_SET_TP = (1 << 9), - + CMD_SET_ITA_MASK = (3 << 10), CMD_SET_ITA_BYTE = (0 << 10), CMD_SET_ITA_WORD = (1 << 10), CMD_SET_ITA_DWORD = (2 << 10), - + CMD_SET_ZUP = (1 << 23), - + CMD_SET_ZB_MODE = (3 << 24), CMD_SET_XP = (1 << 25), CMD_SET_YP = (1 << 26), - + CMD_SET_COMMAND_MASK = (15 << 27) }; @@ -440,7 +440,7 @@ static void render_thread(void *param) { virge_t *virge = (virge_t *)param; - + while (virge->render_thread_run) { thread_wait_event(virge->wake_render_thread, -1); thread_reset_event(virge->wake_render_thread); @@ -467,9 +467,9 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p) uint8_t old; uint32_t cursoraddr; - if (((addr & 0xfff0) == 0x3d0 || (addr & 0xfff0) == 0x3b0) && !(svga->miscout & 1)) + if (((addr & 0xfff0) == 0x3d0 || (addr & 0xfff0) == 0x3b0) && !(svga->miscout & 1)) addr ^= 0x60; - + switch (addr) { case 0x3c5: @@ -495,7 +495,7 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p) return; } break; - + case 0x3d4: svga->crtcreg = val; return; @@ -503,7 +503,7 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p) if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80)) return; if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80)) - val = (svga->crtc[7] & ~0x10) | (val & 0x10); + val = (svga->crtc[7] & ~0x10) | (val & 0x10); if ((svga->crtcreg >= 0x20) && (svga->crtcreg < 0x40) && (svga->crtcreg != 0x36) && (svga->crtcreg != 0x38) && (svga->crtcreg != 0x39) && ((svga->crtc[0x38] & 0xcc) != 0x48)) @@ -516,10 +516,10 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p) return; old = svga->crtc[svga->crtcreg]; svga->crtc[svga->crtcreg] = val; - + if (svga->crtcreg > 0x18) s3_virge_log("OUTB VGA reg = %02x, val = %02x\n", svga->crtcreg, val); - + switch (svga->crtcreg) { case 0x31: @@ -528,11 +528,11 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p) case 0x32: s3_virge_update_irqs(virge); break; - + case 0x69: virge->ma_ext = val & 0x1f; break; - + case 0x35: virge->bank = (virge->bank & 0x70) | (val & 0xf); if (svga->chain4) @@ -555,12 +555,12 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p) else svga->write_bank = svga->read_bank = virge->bank << 14; break; - + case 0x3a: if (val & 0x10) svga->gdcreg[5] |= 0x40; /*Horrible cheat*/ break; - + case 0x45: svga->hwcursor.ena = val & 1; break; @@ -573,7 +573,7 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p) cursoraddr = (virge->memory_size == 8) ? 0x1fff : 0x0fff; svga->hwcursor.addr = ((((svga->crtc[0x4c] << 8) | svga->crtc[0x4d]) & cursoraddr) * 1024) + (svga->hwcursor.yoff * 16); break; - + case 0x4a: switch (virge->hwc_col_stack_pos) { @@ -614,12 +614,12 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p) svga->dpms = (svga->seqregs[0x0d] & 0x50) || (svga->crtc[0x56] & 0x06); old = ~val; /* force recalc */ break; - + case 0x5c: if ((val & 0xa0) == 0x80) i2c_gpio_set(virge->i2c, !!(val & 0x40), !!(val & 0x10)); break; - + case 0x67: switch (val >> 4) { @@ -630,7 +630,7 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p) default: svga->bpp = 8; break; } break; - + case 0xaa: i2c_gpio_set(virge->i2c, !!(val & SERIAL_PORT_SCW), !!(val & SERIAL_PORT_SDW)); break; @@ -660,8 +660,8 @@ static uint8_t s3_virge_in(uint16_t addr, void *p) virge_t *virge = (virge_t *)p; svga_t *svga = &virge->svga; uint8_t ret; - - if (((addr & 0xfff0) == 0x3d0 || (addr & 0xfff0) == 0x3b0) && !(svga->miscout & 1)) + + if (((addr & 0xfff0) == 0x3d0 || (addr & 0xfff0) == 0x3b0) && !(svga->miscout & 1)) addr ^= 0x60; switch (addr) @@ -671,7 +671,7 @@ static uint8_t s3_virge_in(uint16_t addr, void *p) ret = 0xff; else ret = svga_in(addr, svga); - break; + break; case 0x3c5: if (svga->seqaddr >= 8) @@ -690,7 +690,7 @@ static uint8_t s3_virge_in(uint16_t addr, void *p) { case 0x2d: ret = virge->virge_id_high; break; /*Extended chip ID*/ case 0x2e: ret = virge->virge_id_low; break; /*New chip ID*/ - case 0x2f: ret = virge->virge_rev; break; + case 0x2f: ret = virge->virge_rev; break; case 0x30: ret = virge->virge_id; break; /*Chip ID*/ case 0x31: ret = (svga->crtc[0x31] & 0xcf) | ((virge->ma_ext & 3) << 4); break; case 0x33: ret = (svga->crtc[0x33] | 0x04); break; @@ -724,16 +724,16 @@ static uint8_t s3_virge_in(uint16_t addr, void *p) } else ret = svga->crtc[0xaa]; break; - + default: ret = svga->crtc[svga->crtcreg]; break; } break; - + default: ret = svga_in(addr, svga); - break; + break; } return ret; } @@ -741,7 +741,7 @@ static uint8_t s3_virge_in(uint16_t addr, void *p) static void s3_virge_recalctimings(svga_t *svga) { virge_t *virge = (virge_t *)svga->p; - + svga->hdisp = svga->hdisp_old; if (svga->crtc[0x5d] & 0x01) svga->htotal += 0x100; @@ -759,36 +759,36 @@ static void s3_virge_recalctimings(svga_t *svga) if (((svga->miscout >> 2) & 3) == 3) { int n = svga->seqregs[0x12] & 0x1f; int r = (svga->seqregs[0x12] >> 5); - - if (virge->chip == S3_VIRGEVX || virge->chip == S3_VIRGEDX) + + if (virge->chip == S3_VIRGEVX || virge->chip == S3_VIRGEDX) r &= 7; else if (virge->chip >= S3_VIRGEGX2) r &= 10; else r &= 3; - + int m = svga->seqregs[0x13] & 0x7f; double freq = (((double)m + 2) / (((double)n + 2) * (double)(1 << r))) * 14318184.0; svga->clock = (cpuclock * (float)(1ull << 32)) / freq; } - + if ((svga->crtc[0x67] & 0xc) != 0xc) /*VGA mode*/ - { + { svga->fb_only = 0; svga->ma_latch |= (virge->ma_ext << 16); if (svga->crtc[0x51] & 0x30) svga->rowoffset += (svga->crtc[0x51] & 0x30) << 4; else if (svga->crtc[0x43] & 0x04) svga->rowoffset += 0x100; if (!svga->rowoffset) svga->rowoffset = 256; - + svga->lowres = !((svga->gdcreg[5] & 0x40) && (svga->crtc[0x3a] & 0x10)); if ((svga->gdcreg[5] & 0x40) && (svga->crtc[0x3a] & 0x10)) { switch (svga->bpp) { - case 8: - svga->render = svga_render_8bpp_highres; + case 8: + svga->render = svga_render_8bpp_highres; break; - case 15: + case 15: svga->render = svga_render_15bpp_highres; if (virge->chip != S3_VIRGEVX && virge->chip < S3_VIRGEGX2) { @@ -796,12 +796,12 @@ static void s3_virge_recalctimings(svga_t *svga) svga->hdisp >>= 1; } break; - case 16: + case 16: svga->render = svga_render_16bpp_highres; if (virge->chip != S3_VIRGEVX && virge->chip < S3_VIRGEGX2) { svga->htotal >>= 1; - svga->hdisp >>= 1; + svga->hdisp >>= 1; } break; case 24: @@ -809,7 +809,7 @@ static void s3_virge_recalctimings(svga_t *svga) if (virge->chip != S3_VIRGEVX && virge->chip < S3_VIRGEGX2) svga->rowoffset = (svga->rowoffset * 3) / 4; /*Hack*/ break; - case 32: + case 32: svga->render = svga_render_32bpp_highres; break; } @@ -820,16 +820,16 @@ static void s3_virge_recalctimings(svga_t *svga) else /*Streams mode*/ { svga->fb_only = 1; - + if (virge->streams.buffer_ctrl & 1) svga->ma_latch = virge->streams.pri_fb1 >> 2; else svga->ma_latch = virge->streams.pri_fb0 >> 2; - + svga->hdisp = virge->streams.pri_w + 1; if (virge->streams.pri_h < svga->dispend) svga->dispend = virge->streams.pri_h; - + svga->overlay.x = virge->streams.sec_x - virge->streams.pri_x; svga->overlay.y = virge->streams.sec_y - virge->streams.pri_y; svga->overlay.ysize = virge->streams.sec_h; @@ -846,21 +846,21 @@ static void s3_virge_recalctimings(svga_t *svga) switch ((virge->streams.pri_ctrl >> 24) & 0x7) { case 0: /*RGB-8 (CLUT)*/ - svga->render = svga_render_8bpp_highres; + svga->render = svga_render_8bpp_highres; break; - case 3: /*KRGB-16 (1.5.5.5)*/ + case 3: /*KRGB-16 (1.5.5.5)*/ svga->htotal >>= 1; - svga->render = svga_render_15bpp_highres; + svga->render = svga_render_15bpp_highres; break; - case 5: /*RGB-16 (5.6.5)*/ + case 5: /*RGB-16 (5.6.5)*/ svga->htotal >>= 1; - svga->render = svga_render_16bpp_highres; + svga->render = svga_render_16bpp_highres; break; - case 6: /*RGB-24 (8.8.8)*/ - svga->render = svga_render_24bpp_highres; + case 6: /*RGB-24 (8.8.8)*/ + svga->render = svga_render_24bpp_highres; break; case 7: /*XRGB-32 (X.8.8.8)*/ - svga->render = svga_render_32bpp_highres; + svga->render = svga_render_32bpp_highres; break; } svga->vram_display_mask = virge->vram_mask; @@ -880,7 +880,7 @@ static void s3_virge_updatemapping(virge_t *virge) return; } - s3_virge_log("Update mapping - bank %02X ", svga->gdcreg[6] & 0xc); + s3_virge_log("Update mapping - bank %02X ", svga->gdcreg[6] & 0xc); /*Banked framebuffer*/ switch (svga->gdcreg[6] & 0xc) { /*VGA mapping*/ case 0x0: /*128k at A0000*/ @@ -900,7 +900,7 @@ static void s3_virge_updatemapping(virge_t *virge) svga->banked_mask = 0x7fff; break; } - + virge->linear_base = (svga->crtc[0x5a] << 16) | (svga->crtc[0x59] << 24); s3_virge_log("Linear framebuffer %02X, linear base = %08x, display mask = %08x\n", svga->crtc[0x58] & 0x17, virge->linear_base, svga->vram_display_mask); @@ -936,7 +936,7 @@ static void s3_virge_updatemapping(virge_t *virge) } else { virge->linear_base &= 0xfc000000; } - + mem_mapping_set_addr(&virge->linear_mapping, virge->linear_base, virge->linear_size); } svga->fb_only = 1; @@ -944,7 +944,7 @@ static void s3_virge_updatemapping(virge_t *virge) mem_mapping_disable(&virge->linear_mapping); svga->fb_only = 0; } - + s3_virge_log("Memory mapped IO %02X\n", svga->crtc[0x53] & 0x38); /* Memory mapped I/O. */ @@ -984,8 +984,8 @@ s3_virge_mmio_fifo_write(uint32_t addr, uint8_t val, virge_t *virge) case 0x859c: virge->cmd_dma = val; break; - } - } + } + } } static void @@ -1004,7 +1004,7 @@ s3_virge_mmio_fifo_write_w(uint32_t addr, uint16_t val, virge_t *virge) static void s3_virge_mmio_fifo_write_l(uint32_t addr, uint32_t val, virge_t *virge) -{ +{ if ((addr & 0xfffc) < 0x8000) { if (virge->s3d.cmd_set & CMD_SET_MS) s3_virge_bitblt(virge, 32, ((val & 0xff000000) >> 24) | ((val & 0x00ff0000) >> 8) | ((val & 0x0000ff00) << 8) | ((val & 0x000000ff) << 24)); @@ -1016,7 +1016,7 @@ s3_virge_mmio_fifo_write_l(uint32_t addr, uint32_t val, virge_t *virge) case 0x8590: virge->cmd_dma_base = val; break; - + case 0x8594: virge->dma_ptr = val; break; @@ -1027,7 +1027,7 @@ s3_virge_mmio_fifo_write_l(uint32_t addr, uint32_t val, virge_t *virge) case 0x859c: virge->cmd_dma = val; break; - + case 0xa000: case 0xa004: case 0xa008: case 0xa00c: case 0xa010: case 0xa014: case 0xa018: case 0xa01c: case 0xa020: case 0xa024: case 0xa028: case 0xa02c: @@ -1069,7 +1069,7 @@ s3_virge_mmio_fifo_write_l(uint32_t addr, uint32_t val, virge_t *virge) virge->s3d.pattern_8[y*8 + x + 1] = val >> 8; virge->s3d.pattern_8[y*8 + x + 2] = val >> 16; virge->s3d.pattern_8[y*8 + x + 3] = val >> 24; - + x = (addr >> 1) & 6; y = (addr >> 4) & 7; virge->s3d.pattern_16[y*8 + x] = val & 0xffff; @@ -1195,7 +1195,7 @@ s3_virge_mmio_fifo_write_l(uint32_t addr, uint32_t val, virge_t *virge) if (virge->s3d.cmd_set & CMD_SET_AE) s3_virge_bitblt(virge, -1, 0); break; - + case 0xb0f4: case 0xb4f4: virge->s3d_tri.fog_b = val & 0xff; virge->s3d_tri.fog_g = (val >> 8) & 0xff; @@ -1299,7 +1299,7 @@ s3_virge_mmio_fifo_write_l(uint32_t addr, uint32_t val, virge_t *virge) virge->s3d_tri.tas = (val >> 16) & 0xffff; virge->s3d_tri.trs = val & 0xffff; break; - + case 0xb554: virge->s3d_tri.TdZdX = val; break; @@ -1362,7 +1362,7 @@ s3_virge_mmio_read(uint32_t addr, void *p) if (virge->fifo_slot) virge->fifo_slot--; return ret; - + case 0x83b0: case 0x83b1: case 0x83b2: case 0x83b3: case 0x83b4: case 0x83b5: case 0x83b6: case 0x83b7: case 0x83b8: case 0x83b9: case 0x83ba: case 0x83bb: @@ -1376,10 +1376,10 @@ s3_virge_mmio_read(uint32_t addr, void *p) case 0x83d8: case 0x83d9: case 0x83da: case 0x83db: case 0x83dc: case 0x83dd: case 0x83de: case 0x83df: return s3_virge_in(addr & 0x3ff, virge); - + case 0x859c: return virge->cmd_dma; - + case 0xff20: case 0xff21: ret = virge->serialport & ~(SERIAL_PORT_SCR | SERIAL_PORT_SDR); if ((virge->serialport & SERIAL_PORT_SCW) && i2c_gpio_get_scl(virge->i2c)) @@ -1395,9 +1395,9 @@ s3_virge_mmio_read_w(uint32_t addr, void *p) { virge_t *virge = (virge_t *)p; uint16_t ret = 0xffff; - + s3_virge_log("[%04X:%08X]: MMIO ReadW addr = %04x\n", CS, cpu_state.pc, addr & 0xfffe); - + switch (addr & 0xfffe) { case 0x8504: if (!virge->fifo_slot) @@ -1408,10 +1408,10 @@ s3_virge_mmio_read_w(uint32_t addr, void *p) ret |= 0x30; /*A bit of a workaround at the moment.*/ s3_virge_update_irqs(virge); return ret; - + case 0x859c: return virge->cmd_dma; - + default: return s3_virge_mmio_read(addr, virge) | (s3_virge_mmio_read(addr + 1, virge) << 8); @@ -1494,7 +1494,7 @@ s3_virge_mmio_read_l(uint32_t addr, void *p) break; case 0x81fc: ret = virge->streams.sec_size; - break; + break; case 0x8504: if (virge->s3d_busy || virge->fifo_slot) { @@ -1511,7 +1511,7 @@ s3_virge_mmio_read_l(uint32_t addr, void *p) virge->fifo_slot--; s3_virge_update_irqs(virge); break; - + case 0x8590: ret = virge->cmd_dma_base; break; @@ -1523,7 +1523,7 @@ s3_virge_mmio_read_l(uint32_t addr, void *p) case 0x859c: ret = virge->cmd_dma; break; - + case 0xa4d4: ret = virge->s3d.src_base; break; @@ -1569,11 +1569,11 @@ s3_virge_mmio_read_l(uint32_t addr, void *p) case 0xa50c: ret = (virge->s3d.rdest_x << 16) | virge->s3d.rdest_y; break; - + default: ret = s3_virge_mmio_read(addr, virge) | (s3_virge_mmio_read(addr + 1, virge) << 8) | - (s3_virge_mmio_read(addr + 2, virge) << 16) | + (s3_virge_mmio_read(addr + 2, virge) << 16) | (s3_virge_mmio_read(addr + 3, virge) << 24); break; } @@ -1627,7 +1627,7 @@ s3_virge_mmio_write_w(uint32_t addr, uint16_t val, void *p) if ((addr & 0xfffe) == 0x83d4) { s3_virge_mmio_write(addr, val, virge); s3_virge_mmio_write(addr + 1, val >> 8, virge); - } + } } } @@ -1635,12 +1635,12 @@ static void s3_virge_mmio_write_l(uint32_t addr, uint32_t val, void *p) { virge_t *virge = (virge_t *)p; - svga_t *svga = &virge->svga; - + svga_t *svga = &virge->svga; + s3_virge_log("[%04X:%08X]: MMIO WriteL addr = %04x, val = %04x\n", CS, cpu_state.pc, addr & 0xfffc, val); if (((addr & 0xfffc) >= 0x8590) || ((addr & 0xfffc) < 0x8000)) if ((addr & 0xfffc) == 0xff20) - s3_virge_mmio_write(addr, val, virge); + s3_virge_mmio_write(addr, val, virge); else { s3_virge_mmio_fifo_write_l(addr, val, virge); } @@ -1735,38 +1735,38 @@ s3_virge_mmio_write_l(uint32_t addr, uint32_t val, void *p) case 0x81f0: virge->streams.pri_start = val; virge->streams.pri_x = (val >> 16) & 0x7ff; - virge->streams.pri_y = val & 0x7ff; + virge->streams.pri_y = val & 0x7ff; svga_recalctimings(svga); svga->fullchange = changeframecount; break; case 0x81f4: virge->streams.pri_size = val; virge->streams.pri_w = (val >> 16) & 0x7ff; - virge->streams.pri_h = val & 0x7ff; + virge->streams.pri_h = val & 0x7ff; svga_recalctimings(svga); svga->fullchange = changeframecount; break; case 0x81f8: virge->streams.sec_start = val; virge->streams.sec_x = (val >> 16) & 0x7ff; - virge->streams.sec_y = val & 0x7ff; + virge->streams.sec_y = val & 0x7ff; svga_recalctimings(svga); svga->fullchange = changeframecount; break; case 0x81fc: virge->streams.sec_size = val; virge->streams.sec_w = (val >> 16) & 0x7ff; - virge->streams.sec_h = val & 0x7ff; + virge->streams.sec_h = val & 0x7ff; svga_recalctimings(svga); svga->fullchange = changeframecount; break; - + case 0x8504: virge->subsys_stat &= ~(val & 0xff); virge->subsys_cntl = (val >> 8); s3_virge_update_irqs(virge); break; - + case 0x850c: virge->advfunc_cntl = val & 0xff; s3_virge_updatemapping(virge); @@ -1810,7 +1810,7 @@ s3_virge_mmio_write_l(uint32_t addr, uint32_t val, void *p) y > s3d_tri->clip_b)) \ update = 0; \ } - + #define MIX() \ { \ @@ -1862,7 +1862,7 @@ static void s3_virge_bitblt(virge_t *virge, int count, uint32_t cpu_dat) uint32_t source = 0, dest = 0, pattern; uint32_t out = 0; int update; - + switch (virge->s3d.cmd_set & CMD_SET_FORMAT_MASK) { case CMD_SET_FORMAT_8: @@ -1893,7 +1893,7 @@ static void s3_virge_bitblt(virge_t *virge, int count, uint32_t cpu_dat) } if (virge->s3d.cmd_set & CMD_SET_MP) pattern_data = mono_pattern; - + switch (virge->s3d.cmd_set & CMD_SET_ITA_MASK) { case CMD_SET_ITA_BYTE: @@ -1938,7 +1938,7 @@ static void s3_virge_bitblt(virge_t *virge, int count, uint32_t cpu_dat) virge->s3d.h = virge->s3d.r_height; virge->s3d.rop = (virge->s3d.cmd_set >> 17) & 0xff; virge->s3d.data_left_count = 0; - + s3_virge_log("BitBlt start src_x=%i,src_y=%i,dest_x=%i,dest_y=%i,w=%i,h=%i,rop=%02X,src_base=%x,dest_base=%x\n", virge->s3d.src_x, virge->s3d.src_y, @@ -1949,7 +1949,7 @@ static void s3_virge_bitblt(virge_t *virge, int count, uint32_t cpu_dat) virge->s3d.rop, virge->s3d.src_base, virge->s3d.dest_base); - + if (virge->s3d.cmd_set & CMD_SET_IDS) return; } @@ -2020,7 +2020,7 @@ static void s3_virge_bitblt(virge_t *virge, int count, uint32_t cpu_dat) WRITE(dest_addr, out); } - + virge->s3d.src_x += x_inc; virge->s3d.src_x &= 0x7ff; virge->s3d.dest_x += x_inc; @@ -2034,7 +2034,7 @@ static void s3_virge_bitblt(virge_t *virge, int count, uint32_t cpu_dat) virge->s3d.src_y += y_inc; virge->s3d.dest_y += y_inc; virge->s3d.h--; - + switch (virge->s3d.cmd_set & (CMD_SET_MS | CMD_SET_IDS)) { case CMD_SET_IDS: @@ -2054,10 +2054,10 @@ static void s3_virge_bitblt(virge_t *virge, int count, uint32_t cpu_dat) } } else - virge->s3d.w--; + virge->s3d.w--; } break; - + case CMD_SET_COMMAND_RECTFILL: /*No source, pattern = pat_fg_clr*/ if (count == -1) @@ -2069,7 +2069,7 @@ static void s3_virge_bitblt(virge_t *virge, int count, uint32_t cpu_dat) virge->s3d.w = virge->s3d.r_width; virge->s3d.h = virge->s3d.r_height; virge->s3d.rop = (virge->s3d.cmd_set >> 17) & 0xff; - + s3_virge_log("RctFll start %i,%i %i,%i %02X %08x\n", virge->s3d.dest_x, virge->s3d.dest_y, virge->s3d.w, @@ -2115,11 +2115,11 @@ static void s3_virge_bitblt(virge_t *virge, int count, uint32_t cpu_dat) } } else - virge->s3d.w--; + virge->s3d.w--; count--; } break; - + case CMD_SET_COMMAND_LINE: if (count == -1) { @@ -2133,7 +2133,7 @@ static void s3_virge_bitblt(virge_t *virge, int count, uint32_t cpu_dat) int x; int new_x; int first_pixel = 1; - + x = virge->s3d.dest_x >> 20; if (virge->s3d.h == virge->s3d.lycnt && @@ -2146,11 +2146,11 @@ static void s3_virge_bitblt(virge_t *virge, int count, uint32_t cpu_dat) else new_x = (virge->s3d.dest_x + virge->s3d.ldx) >> 20; - + if ((virge->s3d.line_dir && x > new_x) || (!virge->s3d.line_dir && x < new_x)) goto skip_line; - + do { uint32_t dest_addr = virge->s3d.dest_base + (x * x_mul) + (virge->s3d.dest_y * virge->s3d.dest_str); @@ -2179,7 +2179,7 @@ static void s3_virge_bitblt(virge_t *virge, int count, uint32_t cpu_dat) WRITE(dest_addr, out); } - + if (x < new_x) x++; else if (x > new_x) @@ -2225,7 +2225,7 @@ skip_line: WRITE(dest_addr, out); } - + x = (x + xdir) & 0x7ff; } while (x != (xend + xdir)); @@ -2274,21 +2274,21 @@ typedef struct s3d_state_t int32_t r, g, b, a, u, v, d, w; int32_t base_r, base_g, base_b, base_a, base_u, base_v, base_d, base_w; - + uint32_t base_z; uint32_t tbu, tbv; uint32_t cmd_set; int max_d; - + uint16_t *texture[10]; - + uint32_t tex_bdr_clr; - + int32_t x1, x2; int y; - + rgba_t dest_rgba; } s3d_state_t; @@ -2296,7 +2296,7 @@ typedef struct s3d_texture_state_t { int level; int texture_shift; - + int32_t u, v; } s3d_texture_state_t; @@ -2392,7 +2392,7 @@ static void tex_ARGB8888_nowrap(s3d_state_t *state, s3d_texture_state_t *texture static void tex_sample_normal(s3d_state_t *state) { s3d_texture_state_t texture_state; - + texture_state.level = state->max_d; texture_state.texture_shift = 18 + (9 - texture_state.level); texture_state.u = state->u + state->tbu; @@ -2430,12 +2430,12 @@ static void tex_sample_normal_filter(s3d_state_t *state) texture_state.u = state->u + state->tbu + tex_offset; texture_state.v = state->v + state->tbv + tex_offset; tex_read(state, &texture_state, &tex_samples[3]); - + d[0] = (256 - du) * (256 - dv); d[1] = du * (256 - dv); d[2] = (256 - du) * dv; d[3] = du * dv; - + state->dest_rgba.r = (tex_samples[0].r * d[0] + tex_samples[1].r * d[1] + tex_samples[2].r * d[2] + tex_samples[3].r * d[3]) >> 16; state->dest_rgba.g = (tex_samples[0].g * d[0] + tex_samples[1].g * d[1] + tex_samples[2].g * d[2] + tex_samples[3].g * d[3]) >> 16; state->dest_rgba.b = (tex_samples[0].b * d[0] + tex_samples[1].b * d[1] + tex_samples[2].b * d[2] + tex_samples[3].b * d[3]) >> 16; @@ -2469,7 +2469,7 @@ static void tex_sample_mipmap_filter(s3d_state_t *state) texture_state.level = 0; texture_state.texture_shift = 18 + (9 - texture_state.level); tex_offset = 1 << texture_state.texture_shift; - + texture_state.u = state->u + state->tbu; texture_state.v = state->v + state->tbv; tex_read(state, &texture_state, &tex_samples[0]); @@ -2492,7 +2492,7 @@ static void tex_sample_mipmap_filter(s3d_state_t *state) d[1] = du * (256 - dv); d[2] = (256 - du) * dv; d[3] = du * dv; - + state->dest_rgba.r = (tex_samples[0].r * d[0] + tex_samples[1].r * d[1] + tex_samples[2].r * d[2] + tex_samples[3].r * d[3]) >> 16; state->dest_rgba.g = (tex_samples[0].g * d[0] + tex_samples[1].g * d[1] + tex_samples[2].g * d[2] + tex_samples[3].g * d[3]) >> 16; state->dest_rgba.b = (tex_samples[0].b * d[0] + tex_samples[1].b * d[1] + tex_samples[2].b * d[2] + tex_samples[3].b * d[3]) >> 16; @@ -2506,9 +2506,9 @@ static void tex_sample_persp_normal(s3d_state_t *state) if (state->w) w = (int32_t)(((1ULL << 27) << 19) / (int64_t)state->w); - + texture_state.level = state->max_d; - texture_state.texture_shift = 18 + (9 - texture_state.level); + texture_state.texture_shift = 18 + (9 - texture_state.level); texture_state.u = (int32_t)(((int64_t)state->u * (int64_t)w) >> (12 + state->max_d)) + state->tbu; texture_state.v = (int32_t)(((int64_t)state->v * (int64_t)w) >> (12 + state->max_d)) + state->tbv; @@ -2533,7 +2533,7 @@ static void tex_sample_persp_normal_filter(s3d_state_t *state) texture_state.level = state->max_d; texture_state.texture_shift = 18 + (9 - texture_state.level); tex_offset = 1 << texture_state.texture_shift; - + texture_state.u = u; texture_state.v = v; tex_read(state, &texture_state, &tex_samples[0]); @@ -2556,7 +2556,7 @@ static void tex_sample_persp_normal_filter(s3d_state_t *state) d[1] = du * (256 - dv); d[2] = (256 - du) * dv; d[3] = du * dv; - + state->dest_rgba.r = (tex_samples[0].r * d[0] + tex_samples[1].r * d[1] + tex_samples[2].r * d[2] + tex_samples[3].r * d[3]) >> 16; state->dest_rgba.g = (tex_samples[0].g * d[0] + tex_samples[1].g * d[1] + tex_samples[2].g * d[2] + tex_samples[3].g * d[3]) >> 16; state->dest_rgba.b = (tex_samples[0].b * d[0] + tex_samples[1].b * d[1] + tex_samples[2].b * d[2] + tex_samples[3].b * d[3]) >> 16; @@ -2570,9 +2570,9 @@ static void tex_sample_persp_normal_375(s3d_state_t *state) if (state->w) w = (int32_t)(((1ULL << 27) << 19) / (int64_t)state->w); - + texture_state.level = state->max_d; - texture_state.texture_shift = 18 + (9 - texture_state.level); + texture_state.texture_shift = 18 + (9 - texture_state.level); texture_state.u = (int32_t)(((int64_t)state->u * (int64_t)w) >> (8 + state->max_d)) + state->tbu; texture_state.v = (int32_t)(((int64_t)state->v * (int64_t)w) >> (8 + state->max_d)) + state->tbv; @@ -2593,7 +2593,7 @@ static void tex_sample_persp_normal_filter_375(s3d_state_t *state) u = (int32_t)(((int64_t)state->u * (int64_t)w) >> (8 + state->max_d)) + state->tbu; v = (int32_t)(((int64_t)state->v * (int64_t)w) >> (8 + state->max_d)) + state->tbv; - + texture_state.level = state->max_d; texture_state.texture_shift = 18 + (9 - texture_state.level); tex_offset = 1 << texture_state.texture_shift; @@ -2620,7 +2620,7 @@ static void tex_sample_persp_normal_filter_375(s3d_state_t *state) d[1] = du * (256 - dv); d[2] = (256 - du) * dv; d[3] = du * dv; - + state->dest_rgba.r = (tex_samples[0].r * d[0] + tex_samples[1].r * d[1] + tex_samples[2].r * d[2] + tex_samples[3].r * d[3]) >> 16; state->dest_rgba.g = (tex_samples[0].g * d[0] + tex_samples[1].g * d[1] + tex_samples[2].g * d[2] + tex_samples[3].g * d[3]) >> 16; state->dest_rgba.b = (tex_samples[0].b * d[0] + tex_samples[1].b * d[1] + tex_samples[2].b * d[2] + tex_samples[3].b * d[3]) >> 16; @@ -2635,7 +2635,7 @@ static void tex_sample_persp_mipmap(s3d_state_t *state) if (state->w) w = (int32_t)(((1ULL << 27) << 19) / (int64_t)state->w); - + texture_state.level = (state->d < 0) ? state->max_d : state->max_d - ((state->d >> 27) & 0xf); if (texture_state.level < 0) texture_state.level = 0; @@ -2660,7 +2660,7 @@ static void tex_sample_persp_mipmap_filter(s3d_state_t *state) u = (int32_t)(((int64_t)state->u * (int64_t)w) >> (12 + state->max_d)) + state->tbu; v = (int32_t)(((int64_t)state->v * (int64_t)w) >> (12 + state->max_d)) + state->tbv; - + texture_state.level = (state->d < 0) ? state->max_d : state->max_d - ((state->d >> 27) & 0xf); if (texture_state.level < 0) texture_state.level = 0; @@ -2689,7 +2689,7 @@ static void tex_sample_persp_mipmap_filter(s3d_state_t *state) d[1] = du * (256 - dv); d[2] = (256 - du) * dv; d[3] = du * dv; - + state->dest_rgba.r = (tex_samples[0].r * d[0] + tex_samples[1].r * d[1] + tex_samples[2].r * d[2] + tex_samples[3].r * d[3]) >> 16; state->dest_rgba.g = (tex_samples[0].g * d[0] + tex_samples[1].g * d[1] + tex_samples[2].g * d[2] + tex_samples[3].g * d[3]) >> 16; state->dest_rgba.b = (tex_samples[0].b * d[0] + tex_samples[1].b * d[1] + tex_samples[2].b * d[2] + tex_samples[3].b * d[3]) >> 16; @@ -2703,7 +2703,7 @@ static void tex_sample_persp_mipmap_375(s3d_state_t *state) if (state->w) w = (int32_t)(((1ULL << 27) << 19) / (int64_t)state->w); - + texture_state.level = (state->d < 0) ? state->max_d : state->max_d - ((state->d >> 27) & 0xf); if (texture_state.level < 0) texture_state.level = 0; @@ -2728,13 +2728,13 @@ static void tex_sample_persp_mipmap_filter_375(s3d_state_t *state) u = (int32_t)(((int64_t)state->u * (int64_t)w) >> (8 + state->max_d)) + state->tbu; v = (int32_t)(((int64_t)state->v * (int64_t)w) >> (8 + state->max_d)) + state->tbv; - + texture_state.level = (state->d < 0) ? state->max_d : state->max_d - ((state->d >> 27) & 0xf); if (texture_state.level < 0) texture_state.level = 0; texture_state.texture_shift = 18 + (9 - texture_state.level); tex_offset = 1 << texture_state.texture_shift; - + texture_state.u = u; texture_state.v = v; tex_read(state, &texture_state, &tex_samples[0]); @@ -2757,7 +2757,7 @@ static void tex_sample_persp_mipmap_filter_375(s3d_state_t *state) d[1] = du * (256 - dv); d[2] = (256 - du) * dv; d[3] = du * dv; - + state->dest_rgba.r = (tex_samples[0].r * d[0] + tex_samples[1].r * d[1] + tex_samples[2].r * d[2] + tex_samples[3].r * d[3]) >> 16; state->dest_rgba.g = (tex_samples[0].g * d[0] + tex_samples[1].g * d[1] + tex_samples[2].g * d[2] + tex_samples[3].g * d[3]) >> 16; state->dest_rgba.b = (tex_samples[0].b * d[0] + tex_samples[1].b * d[1] + tex_samples[2].b * d[2] + tex_samples[3].b * d[3]) >> 16; @@ -2781,7 +2781,7 @@ static void tex_sample_persp_mipmap_filter_375(s3d_state_t *state) b = ((b) < 0) ? 0 : 0xff; \ if ((a) & ~0xff) \ a = ((a) < 0) ? 0 : 0xff; - + #define CLAMP_RGB(r, g, b) do \ { \ if ((r) < 0) \ @@ -2846,11 +2846,11 @@ static void dest_pixel_lit_texture_reflection(s3d_state_t *state) static void dest_pixel_lit_texture_modulate(s3d_state_t *state) { int r = state->r >> 7, g = state->g >> 7, b = state->b >> 7, a = state->a >> 7; - + tex_sample(state); - + CLAMP_RGBA(r, g, b, a); - + state->dest_rgba.r = ((state->dest_rgba.r) * r) >> 8; state->dest_rgba.g = ((state->dest_rgba.g) * g) >> 8; state->dest_rgba.b = ((state->dest_rgba.b) * b) >> 8; @@ -2865,13 +2865,13 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3 uint8_t *vram = (uint8_t *)svga->vram; int x_dir = s3d_tri->tlr ? 1 : -1; - + int use_z = !(s3d_tri->cmd_set & CMD_SET_ZB_MODE); int y_count = yc; - + int bpp = (s3d_tri->cmd_set >> 2) & 7; - + uint32_t dest_offset = 0, z_offset = 0; uint32_t src_col; @@ -2889,7 +2889,7 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3 int update; uint16_t src_z = 0; - + if (s3d_tri->cmd_set & CMD_SET_HC) { if (state->y < s3d_tri->clip_t) @@ -2897,10 +2897,10 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3 if (state->y > s3d_tri->clip_b) { int diff_y = state->y - s3d_tri->clip_b; - + if (diff_y > y_count) diff_y = y_count; - + state->base_u += (s3d_tri->TdUdY * diff_y); state->base_v += (s3d_tri->TdVdY * diff_y); state->base_z += (s3d_tri->TdZdY * diff_y); @@ -2923,7 +2923,7 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3 dest_offset = s3d_tri->dest_base + (state->y * s3d_tri->dest_str); z_offset = s3d_tri->z_base + (state->y * s3d_tri->z_str); - + while (y_count > 0) { x = (state->x1 + ((1 << 20) - 1)) >> 20; @@ -2965,7 +2965,7 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3 if (x < s3d_tri->clip_l) { int diff_x = s3d_tri->clip_l - x; - + z += (s3d_tri->TdZdX * diff_x); state->u += (s3d_tri->TdUdX * diff_x); state->v += (s3d_tri->TdVdX * diff_x); @@ -2975,7 +2975,7 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3 state->a += (s3d_tri->TdAdX * diff_x); state->d += (s3d_tri->TdDdX * diff_x); state->w += (s3d_tri->TdWdX * diff_x); - + x = s3d_tri->clip_l; } } @@ -2990,7 +2990,7 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3 if (x > s3d_tri->clip_r) { int diff_x = x - s3d_tri->clip_r; - + z += (s3d_tri->TdZdX * diff_x); state->u += (s3d_tri->TdUdX * diff_x); state->v += (s3d_tri->TdVdX * diff_x); @@ -3000,7 +3000,7 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3 state->a += (s3d_tri->TdAdX * diff_x); state->d += (s3d_tri->TdDdX * diff_x); state->w += (s3d_tri->TdWdX * diff_x); - + x = s3d_tri->clip_r; } } @@ -3013,7 +3013,7 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3 x &= 0xfff; xe &= 0xfff; - + while (x != xe) { update = 1; _x = x; _y = state->y; @@ -3105,7 +3105,7 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3 switch (bpp) { - case 0: /*8 bpp*/ + case 0: /*8 bpp*/ /*Not implemented yet*/ break; case 1: /*16 bpp*/ @@ -3139,13 +3139,13 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3 state->w += s3d_tri->TdWdX; dest_addr += x_offset; z_addr += xz_offset; - + x = (x + x_dir) & 0xfff; } } y_count--; - + tri_skip_line: state->x1 += dx1; state->x2 += dx2; @@ -3188,11 +3188,11 @@ static void s3_virge_triangle(virge_t *virge, s3d_t *s3d_tri) state.tbu = s3d_tri->tbu << 11; state.tbv = s3d_tri->tbv << 11; - + state.max_d = (s3d_tri->cmd_set >> 8) & 15; - + state.tex_bdr_clr = s3d_tri->tex_bdr_clr; - + state.cmd_set = s3d_tri->cmd_set; state.base_u = s3d_tri->tus; @@ -3204,7 +3204,7 @@ static void s3_virge_triangle(virge_t *virge, s3d_t *s3d_tri) state.base_a = (int32_t)s3d_tri->tas; state.base_d = s3d_tri->tds; state.base_w = s3d_tri->tws; - + tex_base = s3d_tri->tex_base; for (c = 9; c >= 0; c--) { @@ -3243,8 +3243,8 @@ static void s3_virge_triangle(virge_t *virge, s3d_t *s3d_tri) default: s3_virge_log("bad triangle type %x\n", (s3d_tri->cmd_set >> 27) & 0xf); return; - } - + } + switch (((s3d_tri->cmd_set >> 12) & 7) | ((s3d_tri->cmd_set & (1 << 29)) ? 8 : 0)) { case 0: case 1: @@ -3284,7 +3284,7 @@ static void s3_virge_triangle(virge_t *virge, s3d_t *s3d_tri) tex_sample = virge->bilinear_enabled ? tex_sample_persp_normal_filter : tex_sample_persp_normal; break; } - + switch ((s3d_tri->cmd_set >> 5) & 7) { case 0: @@ -3308,9 +3308,9 @@ static void s3_virge_triangle(virge_t *virge, s3d_t *s3d_tri) tri(virge, s3d_tri, &state, s3d_tri->ty01, s3d_tri->TdXdY02, s3d_tri->TdXdY01); state.x2 = s3d_tri->txend12; tri(virge, s3d_tri, &state, s3d_tri->ty12, s3d_tri->TdXdY02, s3d_tri->TdXdY12); - + end_time = plat_timer_read(); - + virge->blitter_time += end_time - start_time; } @@ -3328,17 +3328,17 @@ static void s3_virge_hwcursor_draw(svga_t *svga, int displine) svga->hwcursor_latch.addr += 16; switch (svga->bpp) - { + { case 15: fg = video_15to32[virge->hwc_fg_col & 0xffff]; bg = video_15to32[virge->hwc_bg_col & 0xffff]; break; - + case 16: fg = video_16to32[virge->hwc_fg_col & 0xffff]; bg = video_16to32[virge->hwc_bg_col & 0xffff]; break; - + case 24: case 32: fg = virge->hwc_fg_col; bg = virge->hwc_bg_col; @@ -3364,7 +3364,7 @@ static void s3_virge_hwcursor_draw(svga_t *svga, int displine) if (dat[0] & 0x8000) buffer32->line[displine][offset + svga->x_add] = (dat[1] & 0x8000) ? fg : bg; } - + offset++; dat[0] <<= 1; dat[1] <<= 1; @@ -3382,7 +3382,7 @@ static void s3_virge_hwcursor_draw(svga_t *svga, int displine) else if (dat[1] & 0x8000) buffer32->line[displine][offset + svga->x_add] ^= 0xffffff; } - + offset++; dat[0] <<= 1; dat[1] <<= 1; @@ -3631,7 +3631,7 @@ static void s3_virge_overlay_draw(svga_t *svga, int displine) int x; uint32_t *p; uint8_t *src = &svga->vram[svga->overlay_latch.addr]; - + p = &(buffer32->line[displine][offset + svga->x_add]); if ((offset + virge->streams.sec_w) > virge->streams.pri_w) @@ -3640,7 +3640,7 @@ static void s3_virge_overlay_draw(svga_t *svga, int displine) x_size = virge->streams.sec_w + 1; OVERLAY_SAMPLE(); - + for (x = 0; x < x_size; x++) { *p++ = r[x_read] | (g[x_read] << 8) | (b[x_read] << 16); @@ -3673,22 +3673,22 @@ static uint8_t s3_virge_pci_read(int func, int addr, void *p) switch (addr) { case 0x00: ret = 0x33; break; /*'S3'*/ case 0x01: ret = 0x53; break; - + case 0x02: ret = virge->virge_id_low; break; case 0x03: ret = virge->virge_id_high; break; case PCI_REG_COMMAND: ret = virge->pci_regs[PCI_REG_COMMAND] & 0x27; break; - + case 0x07: ret = virge->pci_regs[0x07] & 0x36; break; - + case 0x08: ret = virge->virge_rev; break; /*Revision ID*/ case 0x09: ret = 0; break; /*Programming interface*/ - + case 0x0a: ret = 0x00; break; /*Supports VGA interface*/ case 0x0b: ret = 0x03; break; case 0x0d: ret = virge->pci_regs[0x0d] & 0xf8; break; - + case 0x10: ret = 0x00; break;/*Linear frame buffer address*/ case 0x11: ret = 0x00; break; case 0x12: ret = 0x00; break; @@ -3707,12 +3707,12 @@ static uint8_t s3_virge_pci_read(int func, int addr, void *p) case 0x34: ret = (virge->chip >= S3_VIRGEGX2) ? 0xdc : 0x00; break; case 0x3c: ret = virge->pci_regs[0x3c]; break; - + case 0x3d: ret = PCI_INTA; break; /*INTA*/ - + case 0x3e: ret = 0x04; break; case 0x3f: ret = 0xff; break; - + case 0x80: ret = 0x02; break; /* AGP capability */ case 0x81: ret = 0x00; break; case 0x82: ret = 0x10; break; /* assumed AGP 1.0 */ @@ -3746,8 +3746,8 @@ static void s3_virge_pci_write(int func, int addr, uint8_t val, void *p) case 0x00: case 0x01: case 0x02: case 0x03: case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x3d: case 0x3e: case 0x3f: - return; - + return; + case PCI_REG_COMMAND: if (val & PCI_COMMAND_IO) { @@ -3757,12 +3757,12 @@ static void s3_virge_pci_write(int func, int addr, uint8_t val, void *p) else io_removehandler(0x03c0, 0x0020, s3_virge_in, NULL, NULL, s3_virge_out, NULL, NULL, virge); virge->pci_regs[PCI_REG_COMMAND] = val & 0x27; - s3_virge_updatemapping(virge); + s3_virge_updatemapping(virge); return; case 0x07: virge->pci_regs[0x07] = val & 0x3e; return; - case 0x0d: + case 0x0d: virge->pci_regs[0x0d] = val & 0xf8; return; @@ -3786,7 +3786,7 @@ static void s3_virge_pci_write(int func, int addr, uint8_t val, void *p) mem_mapping_disable(&virge->bios_rom.mapping); } return; - case 0x3c: + case 0x3c: virge->pci_regs[0x3c] = val; return; @@ -3834,7 +3834,7 @@ static void s3_virge_reset(void *priv) virge->pci_regs[0x06] = 0; virge->pci_regs[0x07] = 2; virge->pci_regs[0x32] = 0x0c; - virge->pci_regs[0x3d] = 1; + virge->pci_regs[0x3d] = 1; virge->pci_regs[0x3e] = 4; virge->pci_regs[0x3f] = 0xff; @@ -3888,7 +3888,7 @@ static void s3_virge_reset(void *priv) else virge->svga.crtc[0x36] = 2 | (0 << 2) | (1 << 4) | (0 << 5); break; - } + } if (virge->local == S3_VIRGE_GX) virge->svga.crtc[0x36] |= (1 << 2); } @@ -3917,8 +3917,8 @@ static void *s3_virge_init(const device_t *info) virge->memory_size = 4; else virge->memory_size = device_get_config_int("memory"); - - + + switch(info->local) { case S3_VIRGE_325: bios_fn = ROM_VIRGE_325; @@ -3966,7 +3966,7 @@ static void *s3_virge_init(const device_t *info) rom_init(&virge->bios_rom, (char *) bios_fn, 0xc0000, 0x10000, 0xffff, 0, MEM_MAPPING_EXTERNAL); else rom_init(&virge->bios_rom, (char *) bios_fn, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); - + mem_mapping_disable(&virge->bios_rom.mapping); mem_mapping_add(&virge->linear_mapping, 0, 0, svga_read_linear, @@ -4004,10 +4004,10 @@ static void *s3_virge_init(const device_t *info) virge->pci_regs[0x06] = 0; virge->pci_regs[0x07] = 2; virge->pci_regs[0x32] = 0x0c; - virge->pci_regs[0x3d] = 1; + virge->pci_regs[0x3d] = 1; virge->pci_regs[0x3e] = 4; virge->pci_regs[0x3f] = 0xff; - + virge->virge_rev = 0; virge->virge_id = 0xe1; virge->is_agp = !!(info->flags & DEVICE_AGP); @@ -4106,11 +4106,11 @@ static void *s3_virge_init(const device_t *info) else virge->svga.crtc[0x36] = 2 | (0 << 2) | (1 << 4) | (0 << 5); break; - } + } if (info->local == S3_VIRGE_GX) virge->svga.crtc[0x36] |= (1 << 2); } - + virge->svga.crtc[0x37] = 1 | (7 << 5); virge->svga.crtc[0x53] = 8; @@ -4118,7 +4118,7 @@ static void *s3_virge_init(const device_t *info) virge->i2c = i2c_gpio_init("ddc_s3_virge"); virge->ddc = ddc_init(i2c_gpio_get_bus(virge->i2c)); - + virge->svga.force_old_addr = 1; virge->wake_render_thread = thread_create_event(); @@ -4128,9 +4128,9 @@ static void *s3_virge_init(const device_t *info) virge->render_thread = thread_create(render_thread, virge); timer_add(&virge->tri_timer, s3_virge_tri_timer, virge, 0); - + virge->local = info->local; - + return virge; } @@ -4149,7 +4149,7 @@ static void s3_virge_close(void *p) ddc_close(virge->ddc); i2c_gpio_close(virge->i2c); - + free(virge); } @@ -4206,7 +4206,7 @@ static int s3_trio3d2x_available(void) static void s3_virge_speed_changed(void *p) { virge_t *virge = (virge_t *)p; - + svga_recalctimings(&virge->svga); } diff --git a/src/video/vid_svga_render.c b/src/video/vid_svga_render.c index 2d23231be..ca9c3b3f1 100644 --- a/src/video/vid_svga_render.c +++ b/src/video/vid_svga_render.c @@ -396,94 +396,94 @@ svga_render_2bpp_lowres(svga_t *svga) if ((svga->displine + svga->y_add) < 0) return; - if (svga->force_old_addr) { - changed_offset = ((svga->ma << 1) + (svga->sc & ~svga->crtc[0x17] & 3) * 0x8000) >> 12; - - if (svga->changedvram[changed_offset] || svga->changedvram[changed_offset + 1] || svga->fullchange) { - p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; + if (svga->force_old_addr) { + changed_offset = ((svga->ma << 1) + (svga->sc & ~svga->crtc[0x17] & 3) * 0x8000) >> 12; - if (svga->firstline_draw == 2000) - svga->firstline_draw = svga->displine; - svga->lastline_draw = svga->displine; + if (svga->changedvram[changed_offset] || svga->changedvram[changed_offset + 1] || svga->fullchange) { + p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; - for (x = 0; x <= (svga->hdisp + svga->scrollcache); x += 16) { - addr = svga->ma; + if (svga->firstline_draw == 2000) + svga->firstline_draw = svga->displine; + svga->lastline_draw = svga->displine; - if (!(svga->crtc[0x17] & 0x40)) { - addr = (addr << 1) & svga->vram_mask; - addr &= ~7; + for (x = 0; x <= (svga->hdisp + svga->scrollcache); x += 16) { + addr = svga->ma; - if ((svga->crtc[0x17] & 0x20) && (svga->ma & 0x20000)) - addr |= 4; + if (!(svga->crtc[0x17] & 0x40)) { + addr = (addr << 1) & svga->vram_mask; + addr &= ~7; - if (!(svga->crtc[0x17] & 0x20) && (svga->ma & 0x8000)) - addr |= 4; - } + if ((svga->crtc[0x17] & 0x20) && (svga->ma & 0x20000)) + addr |= 4; - if (!(svga->crtc[0x17] & 0x01)) - addr = (addr & ~0x8000) | ((svga->sc & 1) ? 0x8000 : 0); - - if (!(svga->crtc[0x17] & 0x02)) - addr = (addr & ~0x10000) | ((svga->sc & 2) ? 0x10000 : 0); - - dat[0] = svga->vram[addr]; - dat[1] = svga->vram[addr | 0x1]; - if (svga->seqregs[1] & 4) - svga->ma += 2; - else - svga->ma += 4; - svga->ma &= svga->vram_mask; - if (svga->crtc[0x17] & 0x80) { - p[0] = p[1] = svga->pallook[svga->egapal[(dat[0] >> 6) & 3]]; - p[2] = p[3] = svga->pallook[svga->egapal[(dat[0] >> 4) & 3]]; - p[4] = p[5] = svga->pallook[svga->egapal[(dat[0] >> 2) & 3]]; - p[6] = p[7] = svga->pallook[svga->egapal[dat[0] & 3]]; - p[8] = p[9] = svga->pallook[svga->egapal[(dat[1] >> 6) & 3]]; - p[10] = p[11] = svga->pallook[svga->egapal[(dat[1] >> 4) & 3]]; - p[12] = p[13] = svga->pallook[svga->egapal[(dat[1] >> 2) & 3]]; - p[14] = p[15] = svga->pallook[svga->egapal[dat[1] & 3]]; - } else - memset(p, 0x00, 16 * sizeof(uint32_t)); - p += 16; + if (!(svga->crtc[0x17] & 0x20) && (svga->ma & 0x8000)) + addr |= 4; } + + if (!(svga->crtc[0x17] & 0x01)) + addr = (addr & ~0x8000) | ((svga->sc & 1) ? 0x8000 : 0); + + if (!(svga->crtc[0x17] & 0x02)) + addr = (addr & ~0x10000) | ((svga->sc & 2) ? 0x10000 : 0); + + dat[0] = svga->vram[addr]; + dat[1] = svga->vram[addr | 0x1]; + if (svga->seqregs[1] & 4) + svga->ma += 2; + else + svga->ma += 4; + svga->ma &= svga->vram_mask; + if (svga->crtc[0x17] & 0x80) { + p[0] = p[1] = svga->pallook[svga->egapal[(dat[0] >> 6) & 3]]; + p[2] = p[3] = svga->pallook[svga->egapal[(dat[0] >> 4) & 3]]; + p[4] = p[5] = svga->pallook[svga->egapal[(dat[0] >> 2) & 3]]; + p[6] = p[7] = svga->pallook[svga->egapal[dat[0] & 3]]; + p[8] = p[9] = svga->pallook[svga->egapal[(dat[1] >> 6) & 3]]; + p[10] = p[11] = svga->pallook[svga->egapal[(dat[1] >> 4) & 3]]; + p[12] = p[13] = svga->pallook[svga->egapal[(dat[1] >> 2) & 3]]; + p[14] = p[15] = svga->pallook[svga->egapal[dat[1] & 3]]; + } else + memset(p, 0x00, 16 * sizeof(uint32_t)); + p += 16; } - } else { - changed_addr = svga->remap_func(svga, svga->ma); + } + } else { + changed_addr = svga->remap_func(svga, svga->ma); - if (svga->changedvram[changed_addr >> 12] || svga->changedvram[(changed_addr >> 12) + 1] || svga->fullchange) { - p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; + if (svga->changedvram[changed_addr >> 12] || svga->changedvram[(changed_addr >> 12) + 1] || svga->fullchange) { + p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; - if (svga->firstline_draw == 2000) - svga->firstline_draw = svga->displine; - svga->lastline_draw = svga->displine; + if (svga->firstline_draw == 2000) + svga->firstline_draw = svga->displine; + svga->lastline_draw = svga->displine; - for (x = 0; x <= (svga->hdisp + svga->scrollcache); x += 16) { - addr = svga->remap_func(svga, svga->ma); + for (x = 0; x <= (svga->hdisp + svga->scrollcache); x += 16) { + addr = svga->remap_func(svga, svga->ma); - dat[0] = svga->vram[addr]; - dat[1] = svga->vram[addr | 0x1]; - if (svga->seqregs[1] & 4) - svga->ma += 2; - else - svga->ma += 4; + dat[0] = svga->vram[addr]; + dat[1] = svga->vram[addr | 0x1]; + if (svga->seqregs[1] & 4) + svga->ma += 2; + else + svga->ma += 4; - svga->ma &= svga->vram_mask; + svga->ma &= svga->vram_mask; - if (svga->crtc[0x17] & 0x80) { - p[0] = p[1] = svga->pallook[svga->egapal[(dat[0] >> 6) & 3]]; - p[2] = p[3] = svga->pallook[svga->egapal[(dat[0] >> 4) & 3]]; - p[4] = p[5] = svga->pallook[svga->egapal[(dat[0] >> 2) & 3]]; - p[6] = p[7] = svga->pallook[svga->egapal[dat[0] & 3]]; - p[8] = p[9] = svga->pallook[svga->egapal[(dat[1] >> 6) & 3]]; - p[10] = p[11] = svga->pallook[svga->egapal[(dat[1] >> 4) & 3]]; - p[12] = p[13] = svga->pallook[svga->egapal[(dat[1] >> 2) & 3]]; - p[14] = p[15] = svga->pallook[svga->egapal[dat[1] & 3]]; - } else - memset(p, 0x00, 16 * sizeof(uint32_t)); + if (svga->crtc[0x17] & 0x80) { + p[0] = p[1] = svga->pallook[svga->egapal[(dat[0] >> 6) & 3]]; + p[2] = p[3] = svga->pallook[svga->egapal[(dat[0] >> 4) & 3]]; + p[4] = p[5] = svga->pallook[svga->egapal[(dat[0] >> 2) & 3]]; + p[6] = p[7] = svga->pallook[svga->egapal[dat[0] & 3]]; + p[8] = p[9] = svga->pallook[svga->egapal[(dat[1] >> 6) & 3]]; + p[10] = p[11] = svga->pallook[svga->egapal[(dat[1] >> 4) & 3]]; + p[12] = p[13] = svga->pallook[svga->egapal[(dat[1] >> 2) & 3]]; + p[14] = p[15] = svga->pallook[svga->egapal[dat[1] & 3]]; + } else + memset(p, 0x00, 16 * sizeof(uint32_t)); - p += 16; - } + p += 16; } + } } } @@ -500,7 +500,7 @@ svga_render_2bpp_highres(svga_t *svga) if ((svga->displine + svga->y_add) < 0) return; - if (svga->force_old_addr) { + if (svga->force_old_addr) { changed_offset = ((svga->ma << 1) + (svga->sc & ~svga->crtc[0x17] & 3) * 0x8000) >> 12; if (svga->changedvram[changed_offset] || svga->changedvram[changed_offset + 1] || svga->fullchange) { @@ -551,7 +551,7 @@ svga_render_2bpp_highres(svga_t *svga) p += 8; } } - } else { + } else { changed_addr = svga->remap_func(svga, svga->ma); if (svga->changedvram[changed_addr >> 12] || svga->changedvram[(changed_addr >> 12) + 1] || svga->fullchange) { @@ -587,8 +587,8 @@ svga_render_2bpp_highres(svga_t *svga) p += 8; } - } - } + } + } } @@ -666,7 +666,7 @@ svga_render_4bpp_lowres(svga_t *svga) if (svga->changedvram[svga->ma >> 12] || svga->changedvram[(svga->ma >> 12) + 1] || svga->fullchange) { p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; - if (svga->firstline_draw == 2000) + if (svga->firstline_draw == 2000) svga->firstline_draw = svga->displine; svga->lastline_draw = svga->displine; @@ -722,7 +722,7 @@ svga_render_4bpp_lowres(svga_t *svga) p += 16; } - } + } } else { changed_addr = svga->remap_func(svga, svga->ma); @@ -767,7 +767,7 @@ svga_render_4bpp_lowres(svga_t *svga) p += 16; } - } + } } } @@ -784,14 +784,14 @@ svga_render_4bpp_highres(svga_t *svga) if ((svga->displine + svga->y_add) < 0) return; - + if (svga->force_old_addr) { changed_offset = (svga->ma + (svga->sc & ~svga->crtc[0x17] & 3) * 0x8000) >> 12; if (svga->changedvram[changed_offset] || svga->changedvram[changed_offset + 1] || svga->fullchange) { p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; - if (svga->firstline_draw == 2000) + if (svga->firstline_draw == 2000) svga->firstline_draw = svga->displine; svga->lastline_draw = svga->displine; @@ -847,7 +847,7 @@ svga_render_4bpp_highres(svga_t *svga) p += 8; } - } + } } else { changed_addr = svga->remap_func(svga, svga->ma); @@ -908,12 +908,12 @@ svga_render_8bpp_lowres(svga_t *svga) if ((svga->displine + svga->y_add) < 0) return; - + if (svga->force_old_addr) { if (svga->changedvram[svga->ma >> 12] || svga->changedvram[(svga->ma >> 12) + 1] || svga->fullchange) { p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; - if (svga->firstline_draw == 2000) + if (svga->firstline_draw == 2000) svga->firstline_draw = svga->displine; svga->lastline_draw = svga->displine; @@ -981,12 +981,12 @@ svga_render_8bpp_highres(svga_t *svga) if ((svga->displine + svga->y_add) < 0) return; - + if (svga->force_old_addr) { if (svga->changedvram[svga->ma >> 12] || svga->changedvram[(svga->ma >> 12) + 1] || svga->fullchange) { p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; - if (svga->firstline_draw == 2000) + if (svga->firstline_draw == 2000) svga->firstline_draw = svga->displine; svga->lastline_draw = svga->displine; @@ -1172,12 +1172,12 @@ svga_render_15bpp_lowres(svga_t *svga) if ((svga->displine + svga->y_add) < 0) return; - + if (svga->force_old_addr) { if (svga->changedvram[svga->ma >> 12] || svga->changedvram[(svga->ma >> 12) + 1] || svga->fullchange) { p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; - if (svga->firstline_draw == 2000) + if (svga->firstline_draw == 2000) svga->firstline_draw = svga->displine; svga->lastline_draw = svga->displine; @@ -1253,12 +1253,12 @@ svga_render_15bpp_highres(svga_t *svga) if ((svga->displine + svga->y_add) < 0) return; - + if (svga->force_old_addr) { if (svga->changedvram[svga->ma >> 12] || svga->changedvram[(svga->ma >> 12) + 1] || svga->fullchange) { p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; - if (svga->firstline_draw == 2000) + if (svga->firstline_draw == 2000) svga->firstline_draw = svga->displine; svga->lastline_draw = svga->displine; @@ -1282,7 +1282,7 @@ svga_render_15bpp_highres(svga_t *svga) } else memset(&(p[x]), 0x00, 8 * sizeof(uint32_t)); } - svga->ma += x << 1; + svga->ma += x << 1; svga->ma &= svga->vram_display_mask; } } else { @@ -1453,7 +1453,7 @@ svga_render_16bpp_lowres(svga_t *svga) } else memset(&(p[(x << 1)]), 0x00, 8 * sizeof(uint32_t)); } - svga->ma += x << 1; + svga->ma += x << 1; svga->ma &= svga->vram_display_mask; } } else { @@ -1496,7 +1496,7 @@ svga_render_16bpp_lowres(svga_t *svga) svga->ma += 4; } svga->ma &= svga->vram_display_mask; - } + } } } @@ -1511,12 +1511,12 @@ svga_render_16bpp_highres(svga_t *svga) if ((svga->displine + svga->y_add) < 0) return; - + if (svga->force_old_addr) { if (svga->changedvram[svga->ma >> 12] || svga->changedvram[(svga->ma >> 12) + 1] || svga->fullchange) { p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; - if (svga->firstline_draw == 2000) + if (svga->firstline_draw == 2000) svga->firstline_draw = svga->displine; svga->lastline_draw = svga->displine; @@ -1540,9 +1540,9 @@ svga_render_16bpp_highres(svga_t *svga) } else memset(&(p[x]), 0x00, 8 * sizeof(uint32_t)); } - svga->ma += x << 1; + svga->ma += x << 1; svga->ma &= svga->vram_display_mask; - } + } } else { changed_addr = svga->remap_func(svga, svga->ma); @@ -1590,7 +1590,7 @@ svga_render_16bpp_highres(svga_t *svga) } } svga->ma &= svga->vram_display_mask; - } + } } } @@ -1606,13 +1606,13 @@ svga_render_24bpp_lowres(svga_t *svga) if ((svga->displine + svga->y_add) < 0) return; - + if (svga->force_old_addr) { if ((svga->displine + svga->y_add) < 0) return; if (svga->changedvram[svga->ma >> 12] || svga->changedvram[(svga->ma >> 12) + 1] || svga->fullchange) { - if (svga->firstline_draw == 2000) + if (svga->firstline_draw == 2000) svga->firstline_draw = svga->displine; svga->lastline_draw = svga->displine; @@ -1621,7 +1621,7 @@ svga_render_24bpp_lowres(svga_t *svga) fg = svga->vram[svga->ma] | (svga->vram[svga->ma + 1] << 8) | (svga->vram[svga->ma + 2] << 16); else fg = 0x00000000; - svga->ma += 3; + svga->ma += 3; svga->ma &= svga->vram_display_mask; buffer32->line[svga->displine + svga->y_add][(x << 1) + svga->x_add] = buffer32->line[svga->displine + svga->y_add][(x << 1) + 1 + svga->x_add] = fg; @@ -1690,12 +1690,12 @@ svga_render_24bpp_highres(svga_t *svga) if ((svga->displine + svga->y_add) < 0) return; - + if (svga->force_old_addr) { if (svga->changedvram[svga->ma >> 12] || svga->changedvram[(svga->ma >> 12) + 1] || svga->fullchange) { p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; - if (svga->firstline_draw == 2000) + if (svga->firstline_draw == 2000) svga->firstline_draw = svga->displine; svga->lastline_draw = svga->displine; @@ -1718,7 +1718,7 @@ svga_render_24bpp_highres(svga_t *svga) svga->ma += 12; } svga->ma &= svga->vram_display_mask; - } + } } else { changed_addr = svga->remap_func(svga, svga->ma); @@ -1766,7 +1766,7 @@ svga_render_24bpp_highres(svga_t *svga) } } svga->ma &= svga->vram_display_mask; - } + } } } @@ -1781,10 +1781,10 @@ svga_render_32bpp_lowres(svga_t *svga) if ((svga->displine + svga->y_add) < 0) return; - + if (svga->force_old_addr) { if (svga->changedvram[svga->ma >> 12] || svga->changedvram[(svga->ma >> 12) + 1] || svga->fullchange) { - if (svga->firstline_draw == 2000) + if (svga->firstline_draw == 2000) svga->firstline_draw = svga->displine; svga->lastline_draw = svga->displine; @@ -1847,12 +1847,12 @@ svga_render_32bpp_highres(svga_t *svga) if ((svga->displine + svga->y_add) < 0) return; - + if (svga->force_old_addr) { if (svga->changedvram[svga->ma >> 12] || svga->changedvram[(svga->ma >> 12) + 1] || svga->changedvram[(svga->ma >> 12) + 2] || svga->fullchange) { p = &buffer32->line[svga->displine + svga->y_add][svga->x_add]; - - if (svga->firstline_draw == 2000) + + if (svga->firstline_draw == 2000) svga->firstline_draw = svga->displine; svga->lastline_draw = svga->displine; @@ -1863,7 +1863,7 @@ svga_render_32bpp_highres(svga_t *svga) dat = 0x00000000; p[x] = dat & 0xffffff; } - svga->ma += 4; + svga->ma += 4; svga->ma &= svga->vram_display_mask; } } else { diff --git a/src/win/86Box.manifest b/src/win/86Box.manifest index 045e12dbf..58f2d4194 100644 --- a/src/win/86Box.manifest +++ b/src/win/86Box.manifest @@ -43,7 +43,7 @@ - + From c82b9a379c4d6538c2f0f3c3f3f7a6ecc851c145 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 04:03:11 +0500 Subject: [PATCH 48/78] Remove the crashdump generation stuff and the associated parameter It's Windows-exclusive and has never really worked --- src/86box.c | 7 -- src/Makefile.local | 1 - src/include/86box/86box.h | 1 - src/include/86box/win.h | 1 - src/win/CMakeLists.txt | 2 +- src/win/Makefile.mingw | 1 - src/win/win.c | 4 - src/win/win_crashdump.c | 245 -------------------------------------- 8 files changed, 1 insertion(+), 261 deletions(-) delete mode 100644 src/win/win_crashdump.c diff --git a/src/86box.c b/src/86box.c index b1c969509..dd1087b80 100644 --- a/src/86box.c +++ b/src/86box.c @@ -172,7 +172,6 @@ int confirm_reset = 1; /* (C) enable reset confirmation */ int confirm_exit = 1; /* (C) enable exit confirmation */ int confirm_save = 1; /* (C) enable save confirmation */ int enable_discord = 0; /* (C) enable Discord integration */ -int enable_crashdump = 0; /* (C) enable crash dump */ /* Statistics. */ extern int mmuflush; @@ -440,9 +439,6 @@ usage: printf("\nUsage: 86box [options] [cfg-file]\n\n"); printf("Valid options are:\n\n"); printf("-? or --help - show this information\n"); -#ifdef _WIN32 - printf("-A or --crashdump - enables crashdump on exception\n"); -#endif printf("-C or --config path - set 'path' to be config file\n"); #ifdef _WIN32 printf("-D or --debug - force debug output logging\n"); @@ -519,9 +515,6 @@ usage: !strcasecmp(argv[c], "-N")) { confirm_exit_cmdl = 0; #ifdef _WIN32 - } else if (!strcasecmp(argv[c], "--crashdump") || - !strcasecmp(argv[c], "-A")) { - enable_crashdump = 1; } else if (!strcasecmp(argv[c], "--hwnd") || !strcasecmp(argv[c], "-H")) { diff --git a/src/Makefile.local b/src/Makefile.local index c927037d8..4c6830afd 100644 --- a/src/Makefile.local +++ b/src/Makefile.local @@ -172,7 +172,6 @@ EXTRAS := AUTODEP := n -CRASHDUMP := n DEBUG := n OPTIM := n X64 := n diff --git a/src/include/86box/86box.h b/src/include/86box/86box.h index 62aaddc99..110a9d3d4 100644 --- a/src/include/86box/86box.h +++ b/src/include/86box/86box.h @@ -123,7 +123,6 @@ extern int confirm_reset, /* (C) enable reset confirmation */ confirm_exit, /* (C) enable exit confirmation */ confirm_save; /* (C) enable save confirmation */ extern int enable_discord; /* (C) enable Discord integration */ -extern int enable_crashdump; /* (C) enable crash dump */ extern int is_pentium; /* TODO: Move back to cpu/cpu.h when it's figured out, how to remove that hack from the ET4000/W32p. */ diff --git a/src/include/86box/win.h b/src/include/86box/win.h index 5e9f67b36..bb5a78990 100644 --- a/src/include/86box/win.h +++ b/src/include/86box/win.h @@ -120,7 +120,6 @@ extern uint8_t filterindex; extern void ResizeWindowByClientArea(HWND hwnd, int width, int height); -extern void InitCrashDump(void); /* Emulator start/stop support functions. */ extern void do_start(void); diff --git a/src/win/CMakeLists.txt b/src/win/CMakeLists.txt index fc2e3314b..7452f82dc 100644 --- a/src/win/CMakeLists.txt +++ b/src/win/CMakeLists.txt @@ -16,7 +16,7 @@ enable_language(RC) add_library(plat OBJECT win.c win_dynld.c win_cdrom.c win_keyboard.c - win_crashdump.c win_mouse.c) + win_mouse.c) add_library(ui OBJECT win_ui.c win_icon.c win_stbar.c win_sdl.c win_dialog.c win_about.c win_settings.c win_devconf.c win_snd_gain.c win_specify_dim.c win_new_floppy.c diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 82225dc7a..f23bd97d3 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -727,7 +727,6 @@ VOODOOOBJ := vid_voodoo.o vid_voodoo_banshee.o \ PLATOBJ := win.o \ win_dynld.o \ win_cdrom.o win_keyboard.o \ - win_crashdump.o \ win_mouse.o UIOBJ := win_ui.o win_icon.o win_stbar.o discord.o \ diff --git a/src/win/win.c b/src/win/win.c index 922525cf9..e3c3be905 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -493,10 +493,6 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nCmdShow) return(1); } - /* Enable crash dump services. */ - if (enable_crashdump) - InitCrashDump(); - /* Create console window. */ if (force_debug) { CreateConsole(1); diff --git a/src/win/win_crashdump.c b/src/win/win_crashdump.c deleted file mode 100644 index 1da7a49b1..000000000 --- a/src/win/win_crashdump.c +++ /dev/null @@ -1,245 +0,0 @@ -/* - * 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. - * - * Handle generation of crash-dump reports. - * - * - * - * Authors: Riley - * Miran Grca, - * Fred N. van Kempen, - * - * Copyright 2016,2017 Riley. - * Copyright 2016,2017 Miran Grca. - * Copyright 2017 Fred N. van Kempen. - */ -#define _WIN32_WINNT 0x0501 -#include -#include -#include -#include -#include -#include -#include <86box/86box.h> -#include <86box/plat.h> -#include <86box/win.h> - - -#define ExceptionHandlerBufferSize (10240) - - -static PVOID hExceptionHandler; -static char *ExceptionHandlerBuffer, - *CurrentBufferPointer; - - -LONG CALLBACK MakeCrashDump(PEXCEPTION_POINTERS ExceptionInfo) -{ - SYSTEMTIME SystemTime; - HANDLE hDumpFile; - char *BufPtr; - - /* - * Win32-specific functions will be used wherever possible, - * just in case the C stdlib-equivalents try to allocate - * memory. - * (The Win32-specific functions are generally just wrappers - * over NT system calls anyway.) - */ - if ((ExceptionInfo->ExceptionRecord->ExceptionCode >> 28) != 0xC) { - /* - * ExceptionCode is not a fatal exception (high 4b of - * ntstatus = 0xC) Not going to crash, let's not make - * a crash dump. - */ - return(EXCEPTION_CONTINUE_SEARCH); - } - - /* - * So, the program is about to crash. Oh no what do? - * Let's create a crash dump file as a debugging-aid. - * - * First, get the path to the executable. - */ - GetModuleFileName(NULL,ExceptionHandlerBuffer,ExceptionHandlerBufferSize); - if (GetLastError() != ERROR_SUCCESS) { - /* Could not get full path, create in current directory. */ - BufPtr = ExceptionHandlerBuffer; - } else { - /* - * Walk through the string backwards looking for the - * last backslash, so as to remove the "86Box.exe" - * filename from the string. - */ - BufPtr = &ExceptionHandlerBuffer[strlen(ExceptionHandlerBuffer)]; - for (; BufPtr > ExceptionHandlerBuffer; BufPtr--) { - if (BufPtr[0] == '\\') { - /* Found backslash, terminate the string after it. */ - BufPtr[1] = 0; - break; - } - } - - BufPtr = &ExceptionHandlerBuffer[strlen(ExceptionHandlerBuffer)]; - } - - /* - * What would a good filename be? - * - * It should contain the current date and time so as - * to be (hopefully!) unique. - */ - GetSystemTime(&SystemTime); - sprintf(CurrentBufferPointer, - "86box-%d%02d%02d-%02d-%02d-%02d-%03d.dmp", - SystemTime.wYear, - SystemTime.wMonth, - SystemTime.wDay, - SystemTime.wHour, - SystemTime.wMinute, - SystemTime.wSecond, - SystemTime.wMilliseconds); - - /* Now the filename is in the buffer, the file can be created. */ - hDumpFile = CreateFile( - ExceptionHandlerBuffer, // The filename of the file to open. - GENERIC_WRITE, // The permissions to request. - 0, // Make sure other processes can't - // touch the crash dump at all - // while it's open. - NULL, // Leave the security descriptor - // undefined, it doesn't matter. - OPEN_ALWAYS, // Opens the file if it exists, - // creates a new file if it doesn't. - FILE_ATTRIBUTE_NORMAL, // File attributes / etc don't matter. - NULL); // A template file is not being used. - - /* Check to make sure the file was actually created. */ - if (hDumpFile == INVALID_HANDLE_VALUE) { - /* CreateFile() failed, so just do nothing more. */ - return(EXCEPTION_CONTINUE_SEARCH); - } - - /* - * Write the data we were passed out in a human-readable format. - * - * Get the name of the module where the exception occurred. - */ - HMODULE hMods[1024]; - MODULEINFO modInfo; - HMODULE ipModule = 0; - DWORD cbNeeded; - - /* Try to get a list of all loaded modules. */ - if (EnumProcessModules(GetCurrentProcess(), - hMods, sizeof(hMods), &cbNeeded)) { - /* Got it, now walk through all modules.. */ - for (DWORD i = 0; i < (cbNeeded / sizeof(HMODULE)); i++) { - /* For each module, get the module information. */ - GetModuleInformation(GetCurrentProcess(), - hMods[i], &modInfo, sizeof(MODULEINFO)); - /* If the exception address is in the range of this module.. */ - if ( (ExceptionInfo->ExceptionRecord->ExceptionAddress >= modInfo.lpBaseOfDll) && - (ExceptionInfo->ExceptionRecord->ExceptionAddress < (void*)((char*)modInfo.lpBaseOfDll + modInfo.SizeOfImage))) { - /* ...this is the module we're looking for! */ - ipModule = hMods[i]; - break; - } - } - } - - /* Start to put the crash-dump string into the buffer. */ - sprintf(ExceptionHandlerBuffer, - "#\r\n# %s\r\n#\r\n" - "# Crash on %d-%02d-%02d at %02d:%02d:%02d.%03d\r\n#\r\n" - "\r\n" - "Exception details:\r\n" - " NTSTATUS code: 0x%08lx\r\n Address: 0x%p", - emu_version, - SystemTime.wYear, SystemTime.wMonth, SystemTime.wDay, - SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond, - SystemTime.wMilliseconds, - ExceptionInfo->ExceptionRecord->ExceptionCode, - (void *)ExceptionInfo->ExceptionRecord->ExceptionAddress); - - /* - * If we found the correct module, get the full path to - * the module the exception occured at and include it. - */ - BufPtr = &ExceptionHandlerBuffer[strlen(ExceptionHandlerBuffer)]; - if (ipModule != 0) { - sprintf(BufPtr," ["); - GetModuleFileName(ipModule, &BufPtr[2], - ExceptionHandlerBufferSize - strlen(ExceptionHandlerBuffer)); - if (GetLastError() == ERROR_SUCCESS) { - BufPtr = &ExceptionHandlerBuffer[strlen(ExceptionHandlerBuffer)]; - sprintf(BufPtr,"]"); - BufPtr += 1; - } - } - - sprintf(BufPtr, - "\r\nNumber of parameters: %lu\r\nException parameters: ", - ExceptionInfo->ExceptionRecord->NumberParameters); - - for (int i = 0; i < ExceptionInfo->ExceptionRecord->NumberParameters; i++) { - BufPtr = &ExceptionHandlerBuffer[strlen(ExceptionHandlerBuffer)]; - sprintf(BufPtr,"0x%p ", - (void *)ExceptionInfo->ExceptionRecord->ExceptionInformation[i]); - } - BufPtr = &ExceptionHandlerBuffer[strlen(ExceptionHandlerBuffer) - 1]; - -#if defined(__i386__) && !defined(__x86_64) - PCONTEXT Registers = ExceptionInfo->ContextRecord; - - /* This binary is being compiled for x86, include a register dump. */ - sprintf(BufPtr, - "\r\n\r\nRegister dump:\r\n\r\n" - "EIP:0x%08lx\r\n" - "EAX:0x%08lx EBX:0x%08lx ECX:0x%08lx EDX:0x%08lx\r\n" - "EBP:0x%08lx ESP:0x%08lx ESI:0x%08lx EDI:0x%08lx\r\n\r\n", - Registers->Eip, - Registers->Eax, Registers->Ebx, Registers->Ecx, Registers->Edx, - Registers->Ebp, Registers->Esp, Registers->Esi, Registers->Edi); -#else - /* Register dump not supported by this architecture. */ - /* (MinGW headers seem to lack the x64 CONTEXT structure definition) */ - sprintf(BufPtr, "\r\n"); -#endif - - /* Write the string to disk. */ - WriteFile(hDumpFile, ExceptionHandlerBuffer, - strlen(ExceptionHandlerBuffer), NULL, NULL); - - /* Close the file. */ - CloseHandle(hDumpFile); - - /* Return, therefore causing the crash. */ - return(EXCEPTION_CONTINUE_SEARCH); -} - - -void -InitCrashDump(void) -{ - /* - * An exception handler should not allocate memory, - * so allocate 10kb for it to use if it gets called, - * an amount which should be more than enough. - */ - ExceptionHandlerBuffer = malloc(ExceptionHandlerBufferSize); - CurrentBufferPointer = ExceptionHandlerBuffer; - - /* - * Register the exception handler. - * Zero first argument means this exception handler gets - * called last, therefore, crash dump is only made, when - * a crash is going to happen. - */ - hExceptionHandler = AddVectoredExceptionHandler(0, MakeCrashDump); -} From 1a6d596fead9b26c267e16466aee7f9f4ec29b02 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Tue, 12 Apr 2022 17:37:10 +0500 Subject: [PATCH 49/78] Remove the now-redundant LARGEFILE macro definitions --- src/cdrom/cdrom_image.c | 3 --- src/cdrom/cdrom_image_backend.c | 2 -- src/disk/hdc_esdi_at.c | 2 -- src/disk/hdc_ide.c | 3 --- src/disk/hdc_st506_at.c | 3 --- src/disk/hdc_st506_xt.c | 3 --- src/disk/hdc_xta.c | 3 --- src/disk/hdd_image.c | 2 -- src/machine/m_ps1_hdc.c | 3 --- 9 files changed, 24 deletions(-) diff --git a/src/cdrom/cdrom_image.c b/src/cdrom/cdrom_image.c index a4023734e..582b0631b 100644 --- a/src/cdrom/cdrom_image.c +++ b/src/cdrom/cdrom_image.c @@ -16,9 +16,6 @@ * Copyright 2015-2019 Miran Grca. * Copyright 2017-2019 bit. */ -#define __USE_LARGEFILE64 -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE #include #include #include diff --git a/src/cdrom/cdrom_image_backend.c b/src/cdrom/cdrom_image_backend.c index 2542da63c..19f790cf3 100644 --- a/src/cdrom/cdrom_image_backend.c +++ b/src/cdrom/cdrom_image_backend.c @@ -17,8 +17,6 @@ * Copyright 2017-2020 Fred N. van Kempen. * Copyright 2002-2020 The DOSBox Team. */ -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE #define __STDC_FORMAT_MACROS #include #include diff --git a/src/disk/hdc_esdi_at.c b/src/disk/hdc_esdi_at.c index 7ac6b42d2..ff284b231 100644 --- a/src/disk/hdc_esdi_at.c +++ b/src/disk/hdc_esdi_at.c @@ -18,8 +18,6 @@ * Copyright 2016-2019 Miran Grca. * Copyright 2017-2019 Fred N. van Kempen. */ -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE #define _GNU_SOURCE #include #include diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index eaa61e94f..f80662c82 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -17,9 +17,6 @@ * Copyright 2008-2020 Sarah Walker. * Copyright 2016-2020 Miran Grca. */ -#define __USE_LARGEFILE64 -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE #include #include #include diff --git a/src/disk/hdc_st506_at.c b/src/disk/hdc_st506_at.c index 066c30c15..aff35bc76 100644 --- a/src/disk/hdc_st506_at.c +++ b/src/disk/hdc_st506_at.c @@ -20,9 +20,6 @@ * Copyright 2008-2019 Sarah Walker. * Copyright 2017-2019 Fred N. van Kempen. */ -#define __USE_LARGEFILE64 -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE #include #include #include diff --git a/src/disk/hdc_st506_xt.c b/src/disk/hdc_st506_xt.c index 9f582398b..e8c43fdc1 100644 --- a/src/disk/hdc_st506_xt.c +++ b/src/disk/hdc_st506_xt.c @@ -67,9 +67,6 @@ * Boston, MA 02111-1307 * USA. */ -#define __USE_LARGEFILE64 -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE #include #include #include diff --git a/src/disk/hdc_xta.c b/src/disk/hdc_xta.c index ea92bcd59..28990bbdb 100644 --- a/src/disk/hdc_xta.c +++ b/src/disk/hdc_xta.c @@ -84,9 +84,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define __USE_LARGEFILE64 -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE #include #include #include diff --git a/src/disk/hdd_image.c b/src/disk/hdd_image.c index f52be646c..d0ec68fc4 100644 --- a/src/disk/hdd_image.c +++ b/src/disk/hdd_image.c @@ -16,8 +16,6 @@ * Copyright 2016-2018 Miran Grca. * Copyright 2017,2018 Fred N. van Kempen. */ -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE #define _GNU_SOURCE #include #include diff --git a/src/machine/m_ps1_hdc.c b/src/machine/m_ps1_hdc.c index 5cba0e8b5..e7cff2478 100644 --- a/src/machine/m_ps1_hdc.c +++ b/src/machine/m_ps1_hdc.c @@ -82,9 +82,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define __USE_LARGEFILE64 -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE #include #include #include From dd4cef9727405acad676c82df783c99745baf7ca Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Wed, 13 Apr 2022 06:28:51 +0500 Subject: [PATCH 50/78] Fix the remaining CPU warnings --- src/cpu/x86_ops_stack.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/cpu/x86_ops_stack.h b/src/cpu/x86_ops_stack.h index 76b74d393..58f24c6f9 100644 --- a/src/cpu/x86_ops_stack.h +++ b/src/cpu/x86_ops_stack.h @@ -321,7 +321,9 @@ static int opENTER_w(uint32_t fetchdat) uint16_t offset; int count; uint32_t tempEBP, tempESP, frame_ptr; +#ifndef IS_DYNAREC int reads = 0, writes = 1, instr_cycles = 0; +#endif uint16_t tempw; offset = getwordf(); @@ -342,20 +344,26 @@ static int opENTER_w(uint32_t fetchdat) PUSH_W(tempw); if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; } CLOCK_CYCLES((is486) ? 3 : 4); +#ifndef IS_DYNAREC reads++; writes++; instr_cycles += (is486) ? 3 : 4; +#endif } PUSH_W(frame_ptr); if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; } CLOCK_CYCLES((is486) ? 3 : 5); +#ifndef IS_DYNAREC writes++; instr_cycles += (is486) ? 3 : 5; +#endif } BP = frame_ptr; if (stack32) ESP -= offset; else SP -= offset; CLOCK_CYCLES((is486) ? 14 : 10); +#ifndef IS_DYNAREC instr_cycles += (is486) ? 14 : 10; PREFETCH_RUN(instr_cycles, 3, -1, reads,0,writes,0, 0); +#endif return 0; } static int opENTER_l(uint32_t fetchdat) @@ -363,7 +371,9 @@ static int opENTER_l(uint32_t fetchdat) uint16_t offset; int count; uint32_t tempEBP, tempESP, frame_ptr; +#ifndef IS_DYNAREC int reads = 0, writes = 1, instr_cycles = 0; +#endif uint32_t templ; offset = getwordf(); @@ -383,20 +393,26 @@ static int opENTER_l(uint32_t fetchdat) PUSH_L(templ); if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; } CLOCK_CYCLES((is486) ? 3 : 4); +#ifndef IS_DYNAREC reads++; writes++; instr_cycles += (is486) ? 3 : 4; +#endif } PUSH_L(frame_ptr); if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; } CLOCK_CYCLES((is486) ? 3 : 5); +#ifndef IS_DYNAREC writes++; instr_cycles += (is486) ? 3 : 5; +#endif } EBP = frame_ptr; if (stack32) ESP -= offset; else SP -= offset; CLOCK_CYCLES((is486) ? 14 : 10); +#ifndef IS_DYNAREC instr_cycles += (is486) ? 14 : 10; PREFETCH_RUN(instr_cycles, 3, -1, reads,0,writes,0, 0); +#endif return 0; } From 4d18efd8258d5fd9dd8920e34bbd4f3786222a2f Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 06:45:38 +0500 Subject: [PATCH 51/78] Remove the leftovers of the removed --vmrompath parameter --- src/86box.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/86box.c b/src/86box.c index dd1087b80..2b53f1d35 100644 --- a/src/86box.c +++ b/src/86box.c @@ -402,7 +402,7 @@ pc_init(int argc, char *argv[]) char temp[2048]; struct tm *info; time_t now; - int c, vmrp = 0; + int c; int ng = 0, lvmp = 0; uint32_t *uid, *shwnd; uint32_t lang_init = 0; @@ -459,9 +459,6 @@ usage: printf("-Z or --lastvmpath - the last parameter is VM path rather than config\n"); printf("\nA config file can be specified. If none is, the default file will be used.\n"); return(0); - } else if (!strcasecmp(argv[c], "--vmrompath") || - !strcasecmp(argv[c], "-M")) { - vmrp = 1; } else if (!strcasecmp(argv[c], "--lastvmpath") || !strcasecmp(argv[c], "-Z")) { lvmp = 1; From 484a0821228d14e129daa9f939960ede60181abd Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 06:48:25 +0500 Subject: [PATCH 52/78] Make sure certain variables used only on some platforms are defined only on said platforms --- src/86box.c | 2 ++ src/qt/qt_mainwindow.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/86box.c b/src/86box.c index 2b53f1d35..7c5570a5c 100644 --- a/src/86box.c +++ b/src/86box.c @@ -404,7 +404,9 @@ pc_init(int argc, char *argv[]) time_t now; int c; int ng = 0, lvmp = 0; +#ifdef _WIN32 uint32_t *uid, *shwnd; +#endif uint32_t lang_init = 0; /* Grab the executable's full path. */ diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index ca3cf1a2e..09676ee34 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -625,6 +625,7 @@ void MainWindow::on_actionSettings_triggered() { plat_pause(currentPause); } +#if defined(__unix__) && !defined(__HAIKU__) std::array x11_to_xt_base { 0, @@ -952,7 +953,9 @@ std::array x11_to_xt_vnc 0x14B, 0x14D, }; +#endif +#ifdef Q_OS_MACOS std::array darwin_to_xt { 0x1E, @@ -1084,7 +1087,9 @@ std::array darwin_to_xt 0x148, 0, }; +#endif +#if defined(__unix__) && !defined(__HAIKU__) static std::unordered_map evdev_to_xt = { {96, 0x11C}, @@ -1104,6 +1109,7 @@ static std::unordered_map evdev_to_xt = {110, 0x152}, {111, 0x153} }; +#endif #ifdef __HAIKU__ static std::unordered_map be_to_xt = @@ -1216,7 +1222,9 @@ static std::unordered_map be_to_xt = }; #endif +#if defined(__unix__) && !defined(__HAIKU__) static std::array& selected_keycode = x11_to_xt_base; +#endif uint16_t x11_keycode_to_keysym(uint32_t keycode) { From bacc78da24fa53933a799f8665419190af36e64d Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 06:50:23 +0500 Subject: [PATCH 53/78] Fix instances of narrow string literals being used where wide ones should be used --- src/win/win.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/win/win.c b/src/win/win.c index e3c3be905..18f3a1697 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -913,10 +913,10 @@ plat_init_rom_paths() { wchar_t appdata_dir[1024] = { L'\0' }; - if (_wgetenv("LOCALAPPDATA") && _wgetenv("LOCALAPPDATA")[0] != L'\0') { + if (_wgetenv(L"LOCALAPPDATA") && _wgetenv(L"LOCALAPPDATA")[0] != L'\0') { char appdata_dir_a[1024] = { '\0' }; size_t len = 0; - wcsncpy(appdata_dir, _wgetenv("LOCALAPPDATA"), 1024); + wcsncpy(appdata_dir, _wgetenv(L"LOCALAPPDATA"), 1024); len = wcslen(appdata_dir); if (appdata_dir[len - 1] != L'\\') { appdata_dir[len] = L'\\'; From 519781ff4f8a49167a42bc12a7ce4d1c30757d77 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 06:54:56 +0500 Subject: [PATCH 54/78] Add a missing include and disable extraneous logging in codegen_backend_arm.c --- src/codegen_new/codegen_backend_arm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/codegen_new/codegen_backend_arm.c b/src/codegen_new/codegen_backend_arm.c index ce5f788ce..7030c401a 100644 --- a/src/codegen_new/codegen_backend_arm.c +++ b/src/codegen_new/codegen_backend_arm.c @@ -22,6 +22,7 @@ #if defined WIN32 || defined _WIN32 || defined _WIN32 #include #endif +#include void *codegen_mem_load_byte; void *codegen_mem_load_word; @@ -310,7 +311,7 @@ void codegen_backend_init() block->data = codeblock_allocator_get_ptr(block->head_mem_block); block_write_data = block->data; build_loadstore_routines(&codeblock[block_current]); -printf("block_pos=%i\n", block_pos); +//pclog("block_pos=%i\n", block_pos); codegen_fp_round = &block_write_data[block_pos]; build_fp_round_routine(&codeblock[block_current]); From 042e3df65d469c03cf1b2d068102619cff3e1d30 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 06:56:03 +0500 Subject: [PATCH 55/78] Suppress a false positive -Wformat-truncation warning in Discord integration code --- src/discord.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/discord.c b/src/discord.c index 7a9dc1fec..12a5a0396 100644 --- a/src/discord.c +++ b/src/discord.c @@ -88,6 +88,8 @@ discord_update_activity(int paused) if (paren) *(paren - 1) = '\0'; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-truncation" if (strlen(vm_name) < 100) { snprintf(activity.details, sizeof(activity.details), "Running \"%s\"", vm_name); @@ -98,6 +100,7 @@ discord_update_activity(int paused) strncpy(activity.details, strchr(machine_getname(), ']') + 2, sizeof(activity.details) - 1); snprintf(activity.state, sizeof(activity.state), "%s/%s", cpufamily, cpu_s->name); } +#pragma GCC diagnostic pop activity.timestamps.start = time(NULL); From 4e82d93729f083bc3a94533288005d3deb64cf62 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 07:00:06 +0500 Subject: [PATCH 56/78] Fix warnings related to variable types --- src/86box.c | 2 +- src/codegen/codegen_ops_x86-64.h | 4 ++-- src/codegen_new/codegen_backend_x86-64_ops.c | 8 ++++---- src/codegen_new/codegen_reg.c | 2 +- src/qt/evdev_mouse.cpp | 4 ++-- src/qt/qt_harddiskdialog.cpp | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/86box.c b/src/86box.c index 7c5570a5c..8011b7e7c 100644 --- a/src/86box.c +++ b/src/86box.c @@ -1169,7 +1169,7 @@ pc_close(thread_t *ptr) #ifdef __APPLE__ static void _ui_window_title(void *s) { - ui_window_title((const wchar_t *) s); + ui_window_title((wchar_t *) s); free(s); } #endif diff --git a/src/codegen/codegen_ops_x86-64.h b/src/codegen/codegen_ops_x86-64.h index 08d4591ec..8f38b6b90 100644 --- a/src/codegen/codegen_ops_x86-64.h +++ b/src/codegen/codegen_ops_x86-64.h @@ -23,12 +23,12 @@ static inline int find_host_xmm_reg() } static inline void call(codeblock_t *block, uintptr_t func) { - uintptr_t diff = func - (uintptr_t)&block->data[block_pos + 5]; + intptr_t diff = (intptr_t)(func - (uintptr_t)&block->data[block_pos + 5]); codegen_reg_loaded[0] = codegen_reg_loaded[1] = codegen_reg_loaded[2] = codegen_reg_loaded[3] = 0; codegen_reg_loaded[4] = codegen_reg_loaded[5] = codegen_reg_loaded[6] = codegen_reg_loaded[7] = 0; - if (diff >= -0x80000000ULL && diff < 0x7fffffffULL) + if (diff >= -0x80000000 && diff < 0x7fffffff) { addbyte(0xE8); /*CALL*/ addlong((uint32_t)diff); diff --git a/src/codegen_new/codegen_backend_x86-64_ops.c b/src/codegen_new/codegen_backend_x86-64_ops.c index 08079bf26..32739668a 100644 --- a/src/codegen_new/codegen_backend_x86-64_ops.c +++ b/src/codegen_new/codegen_backend_x86-64_ops.c @@ -27,10 +27,10 @@ static inline void call(codeblock_t *block, uintptr_t func) { - uintptr_t diff; + intptr_t diff; codegen_alloc_bytes(block, 5); - diff = func - (uintptr_t)&block_write_data[block_pos + 5]; + diff = (intptr_t)(func - (uintptr_t)&block_write_data[block_pos + 5]); if (diff >= -0x80000000 && diff < 0x7fffffff) { @@ -48,10 +48,10 @@ static inline void call(codeblock_t *block, uintptr_t func) static inline void jmp(codeblock_t *block, uintptr_t func) { - uintptr_t diff; + intptr_t diff; codegen_alloc_bytes(block, 5); - diff = func - (uintptr_t)&block_write_data[block_pos + 5]; + diff = (intptr_t)(func - (uintptr_t)&block_write_data[block_pos + 5]); if (diff >= -0x80000000 && diff < 0x7fffffff) { diff --git a/src/codegen_new/codegen_reg.c b/src/codegen_new/codegen_reg.c index c11d1ade5..6b0cc0fd3 100644 --- a/src/codegen_new/codegen_reg.c +++ b/src/codegen_new/codegen_reg.c @@ -513,7 +513,7 @@ void codegen_reg_write_imm(codeblock_t *block, ir_reg_t ir_reg, uint32_t imm_dat case REG_DWORD: if ((uintptr_t)p < 256) - codegen_direct_write_32_imm_stack(block, (int)p, imm_data); + codegen_direct_write_32_imm_stack(block, (int)((uintptr_t) p), imm_data); else codegen_direct_write_32_imm(block, p, imm_data); break; diff --git a/src/qt/evdev_mouse.cpp b/src/qt/evdev_mouse.cpp index c04c8c8d6..8d708d3a1 100644 --- a/src/qt/evdev_mouse.cpp +++ b/src/qt/evdev_mouse.cpp @@ -56,7 +56,7 @@ void evdev_thread_func() { while (!stopped) { - for (int i = 0; i < evdev_mice.size(); i++) + for (unsigned int i = 0; i < evdev_mice.size(); i++) { struct input_event ev; int rc = libevdev_next_event(evdev_mice[i].second, LIBEVDEV_READ_FLAG_NORMAL, &ev); @@ -67,7 +67,7 @@ void evdev_thread_func() } } } - for (int i = 0; i < evdev_mice.size(); i++) + for (unsigned int i = 0; i < evdev_mice.size(); i++) { libevdev_free(evdev_mice[i].second); close(evdev_mice[i].first); diff --git a/src/qt/qt_harddiskdialog.cpp b/src/qt/qt_harddiskdialog.cpp index b7a44d952..dd598af46 100644 --- a/src/qt/qt_harddiskdialog.cpp +++ b/src/qt/qt_harddiskdialog.cpp @@ -564,7 +564,7 @@ void HarddiskDialog::onExistingFileSelected(const QString &fileName) { else if (((size % 3072) == 0) && (size <= 53477376)) heads = 6; else { - int i; + uint32_t i; for (i = 5; i < 16; i++) { if (((size % (i << 9)) == 0) && (size <= ((i * 17) << 19))) break; From 911821434e4e96952bfadc469589183ed8bbf3a7 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 07:01:52 +0500 Subject: [PATCH 57/78] Fix variable initializtion warnings --- src/mem/rom.c | 2 +- src/mem/spd.c | 2 +- src/qt/qt_deviceconfig.cpp | 2 +- src/video/vid_ati_mach64.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mem/rom.c b/src/mem/rom.c index 5300e47a0..a4c30be99 100644 --- a/src/mem/rom.c +++ b/src/mem/rom.c @@ -94,7 +94,7 @@ rom_fopen(char *fn, char *mode) { char temp[1024]; rom_path_t *rom_path = &rom_paths; - FILE *fp; + FILE *fp = NULL; if (strstr(fn, "roms/") == fn) { /* Relative path */ diff --git a/src/mem/spd.c b/src/mem/spd.c index 96df99867..aab1511d6 100644 --- a/src/mem/spd.c +++ b/src/mem/spd.c @@ -405,7 +405,7 @@ void spd_write_drbs_with_ext(uint8_t *regs, uint8_t reg_min, uint8_t reg_max, uint8_t drb_unit) { uint8_t row, dimm, drb; - uint16_t size, row_val, rows[SPD_MAX_SLOTS]; + uint16_t size, row_val = 0, rows[SPD_MAX_SLOTS]; int shift; /* No SPD: split SIMMs into pairs as if they were "DIMM"s. */ diff --git a/src/qt/qt_deviceconfig.cpp b/src/qt/qt_deviceconfig.cpp index 3ea8cc0ab..0b2047785 100644 --- a/src/qt/qt_deviceconfig.cpp +++ b/src/qt/qt_deviceconfig.cpp @@ -117,7 +117,7 @@ void DeviceConfig::ConfigureDevice(const _device_* device, int instance, Setting cbox->setObjectName(config->name); auto* model = cbox->model(); int currentIndex = -1; - int selected; + int selected = 0; switch (config->type) { case CONFIG_SELECTION: selected = config_get_int(device_context.name, const_cast(config->name), config->default_int); diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index 3cfc22db3..3caa710e7 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -1283,7 +1283,7 @@ void mach64_blit(uint32_t cpu_dat, int count, mach64_t *mach64) case OP_RECT: while (count) { - uint32_t src_dat, dest_dat; + uint32_t src_dat = 0, dest_dat; uint32_t host_dat = 0; uint32_t old_dest_dat; int mix = 0; From ae11a2f887e5d3ec9f7b3938e7e1c2542f47728c Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 07:02:27 +0500 Subject: [PATCH 58/78] Ensure null termination with strncpy --- src/qt/qt_mediamenu.cpp | 2 +- src/qt/qt_settingsharddisks.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qt/qt_mediamenu.cpp b/src/qt/qt_mediamenu.cpp index 64f547272..3ee08879a 100644 --- a/src/qt/qt_mediamenu.cpp +++ b/src/qt/qt_mediamenu.cpp @@ -188,7 +188,7 @@ void MediaMenu::cassetteMount(const QString& filename, bool wp) { if (! filename.isEmpty()) { QByteArray filenameBytes = filename.toUtf8(); - strncpy(cassette_fname, filenameBytes.data(), sizeof(cassette_fname)); + strncpy(cassette_fname, filenameBytes.data(), sizeof(cassette_fname) - 1); pc_cas_set_fname(cassette, cassette_fname); } diff --git a/src/qt/qt_settingsharddisks.cpp b/src/qt/qt_settingsharddisks.cpp index 43cd3fc9c..df9c6b1dc 100644 --- a/src/qt/qt_settingsharddisks.cpp +++ b/src/qt/qt_settingsharddisks.cpp @@ -151,7 +151,7 @@ void SettingsHarddisks::save() { hdd[i].spt = idx.siblingAtColumn(ColumnSectors).data().toUInt(); QByteArray fileName = idx.siblingAtColumn(ColumnFilename).data(Qt::UserRole).toString().toUtf8(); - strncpy(hdd[i].fn, fileName.data(), sizeof(hdd[i].fn)); + strncpy(hdd[i].fn, fileName.data(), sizeof(hdd[i].fn) - 1); hdd[i].priv = nullptr; } } @@ -247,12 +247,14 @@ static void addDriveFromDialog(Ui::SettingsHarddisks* ui, const HarddiskDialog& QByteArray fn = dlg.fileName().toUtf8(); hard_disk_t hd; + memset(&hd, 0, sizeof(hd)); + hd.bus = dlg.bus(); hd.channel = dlg.channel(); hd.tracks = dlg.cylinders(); hd.hpc = dlg.heads(); hd.spt = dlg.sectors(); - strncpy(hd.fn, fn.data(), sizeof(hd.fn)); + strncpy(hd.fn, fn.data(), sizeof(hd.fn) - 1); addRow(ui->tableView->model(), &hd); ui->tableView->resizeColumnsToContents(); From 710d34db970828902efdf39e3e928edd5f38ecc7 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 07:03:02 +0500 Subject: [PATCH 59/78] Remove unused variables and functions --- src/codegen_new/codegen_backend_arm64.c | 8 -------- src/codegen_new/codegen_backend_arm64_ops.c | 6 ------ src/codegen_new/codegen_backend_x86-64.c | 6 ------ src/codegen_new/codegen_backend_x86.c | 7 +------ src/floppy/fdd_imd.c | 5 ----- src/machine/m_ps2_mca.c | 9 ++++++++- src/mem/mem.c | 2 -- src/mem/rom.c | 8 ++++---- src/qt/qt_newfloppydialog.cpp | 10 ---------- src/qt/xinput2_mouse.cpp | 2 -- src/video/vid_cl54xx.c | 6 ------ src/video/vid_herculesplus.c | 6 +----- 12 files changed, 14 insertions(+), 61 deletions(-) diff --git a/src/codegen_new/codegen_backend_arm64.c b/src/codegen_new/codegen_backend_arm64.c index 4c77f8910..ce1082d0a 100644 --- a/src/codegen_new/codegen_backend_arm64.c +++ b/src/codegen_new/codegen_backend_arm64.c @@ -74,7 +74,6 @@ static void build_load_routine(codeblock_t *block, int size, int is_float) { uint32_t *branch_offset; uint32_t *misaligned_offset; - int offset; /*In - W0 = address Out - W0 = data, W1 = abrt*/ @@ -143,7 +142,6 @@ static void build_store_routine(codeblock_t *block, int size, int is_float) { uint32_t *branch_offset; uint32_t *misaligned_offset; - int offset; /*In - R0 = address, R1 = data Out - R1 = abrt*/ @@ -283,12 +281,6 @@ void codegen_backend_init() { codeblock_t *block; int c; -#if defined(__linux__) || defined(__APPLE__) - void *start; - size_t len; - long pagesize = sysconf(_SC_PAGESIZE); - long pagemask = ~(pagesize - 1); -#endif codeblock = malloc(BLOCK_SIZE * sizeof(codeblock_t)); codeblock_hash = malloc(HASH_SIZE * sizeof(codeblock_t *)); diff --git a/src/codegen_new/codegen_backend_arm64_ops.c b/src/codegen_new/codegen_backend_arm64_ops.c index a33062299..0cc20d788 100644 --- a/src/codegen_new/codegen_backend_arm64_ops.c +++ b/src/codegen_new/codegen_backend_arm64_ops.c @@ -270,12 +270,6 @@ static inline int imm_is_imm16(uint32_t imm_data) return 1; return 0; } -static inline int imm_is_imm12(uint32_t imm_data) -{ - if (!(imm_data & 0xfffff000) || !(imm_data & 0xff000fff)) - return 1; - return 0; -} static void codegen_allocate_new_block(codeblock_t *block); diff --git a/src/codegen_new/codegen_backend_x86-64.c b/src/codegen_new/codegen_backend_x86-64.c index 02bcf2ab3..8411ca8da 100644 --- a/src/codegen_new/codegen_backend_x86-64.c +++ b/src/codegen_new/codegen_backend_x86-64.c @@ -294,12 +294,6 @@ void codegen_backend_init() { codeblock_t *block; int c; -#if defined(__linux__) || defined(__APPLE__) - void *start; - size_t len; - long pagesize = sysconf(_SC_PAGESIZE); - long pagemask = ~(pagesize - 1); -#endif codeblock = malloc(BLOCK_SIZE * sizeof(codeblock_t)); codeblock_hash = malloc(HASH_SIZE * sizeof(codeblock_t *)); diff --git a/src/codegen_new/codegen_backend_x86.c b/src/codegen_new/codegen_backend_x86.c index 8bbc950e6..14327607b 100644 --- a/src/codegen_new/codegen_backend_x86.c +++ b/src/codegen_new/codegen_backend_x86.c @@ -268,12 +268,7 @@ void codegen_backend_init() { codeblock_t *block; int c; -#if defined(__linux__) || defined(__APPLE__) - void *start; - size_t len; - long pagesize = sysconf(_SC_PAGESIZE); - long pagemask = ~(pagesize - 1); -#endif + codeblock = malloc(BLOCK_SIZE * sizeof(codeblock_t)); codeblock_hash = malloc(HASH_SIZE * sizeof(codeblock_t *)); diff --git a/src/floppy/fdd_imd.c b/src/floppy/fdd_imd.c index 5315f7e97..cd76e6204 100644 --- a/src/floppy/fdd_imd.c +++ b/src/floppy/fdd_imd.c @@ -148,8 +148,6 @@ track_is_xdf(int drive, int side, int track) int max_high_id, expected_high_count, expected_low_count; uint8_t *r_map; uint8_t *n_map; - char *data_base; - char *cur_data; effective_sectors = xdf_sectors = high_sectors = low_sectors = 0; @@ -162,7 +160,6 @@ track_is_xdf(int drive, int side, int track) (dev->tracks[track][side].params[3] != 19)) return(0); r_map = (uint8_t *)(dev->buffer + dev->tracks[track][side].r_map_offs); - data_base = dev->buffer + dev->tracks[track][side].data_offs; if (! track) { if (dev->tracks[track][side].params[4] != 2) return(0); @@ -197,7 +194,6 @@ track_is_xdf(int drive, int side, int track) n_map = (uint8_t *) (dev->buffer + dev->tracks[track][side].n_map_offs); - cur_data = data_base; for (i = 0; i < dev->tracks[track][side].params[3]; i++) { effective_sectors++; if (!(r_map[i]) && !(n_map[i])) @@ -207,7 +203,6 @@ track_is_xdf(int drive, int side, int track) xdf_sectors++; dev->xdf_ordered_pos[(int) r_map[i]][side] = i; } - cur_data += (128 << ((uint32_t) n_map[i])); } if ((effective_sectors == 3) && (xdf_sectors == 3)) { diff --git a/src/machine/m_ps2_mca.c b/src/machine/m_ps2_mca.c index 999e3bd8f..094487d37 100644 --- a/src/machine/m_ps2_mca.c +++ b/src/machine/m_ps2_mca.c @@ -401,7 +401,10 @@ static void model_50_write(uint16_t port, uint8_t val) static void model_55sx_mem_recalc(void) { - int i, j, state, enabled_mem = 0; + int i, j, state; +#ifdef ENABLE_PS2_MCA_LOG + int enabled_mem = 0; +#endif int base = 0, remap_size = (ps2.option[3] & 0x10) ? 384 : 256; int bit_mask = 0x00, max_rows = 4; int bank_to_rows[16] = { 4, 2, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0 }; @@ -424,14 +427,18 @@ static void model_55sx_mem_recalc(void) if (ps2.memory_bank[i] & (1 << j)) { ps2_mca_log("Set memory at %06X-%06X to internal\n", (base * 1024), (base * 1024) + (((base > 0) ? 1024 : 640) * 1024) - 1); mem_set_mem_state(base * 1024, ((base > 0) ? 1024 : 640) * 1024, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL); +#ifdef ENABLE_PS2_MCA_LOG enabled_mem += 1024; +#endif bit_mask |= (1 << (j + (i << 2))); } base += 1024; } } +#ifdef ENABLE_PS2_MCA_LOG ps2_mca_log("Enabled memory: %i kB (%02X)\n", enabled_mem, bit_mask); +#endif if (ps2.option[3] & 0x10) { diff --git a/src/mem/mem.c b/src/mem/mem.c index bdb0c4cdb..4a54c72f2 100644 --- a/src/mem/mem.c +++ b/src/mem/mem.c @@ -2210,8 +2210,6 @@ void mem_invalidate_range(uint32_t start_addr, uint32_t end_addr) { #ifdef USE_NEW_DYNAREC - int byte_offset; - uint64_t byte_mask; page_t *p; start_addr &= ~PAGE_MASK_MASK; diff --git a/src/mem/rom.c b/src/mem/rom.c index a4c30be99..3373ca530 100644 --- a/src/mem/rom.c +++ b/src/mem/rom.c @@ -93,12 +93,12 @@ FILE * rom_fopen(char *fn, char *mode) { char temp[1024]; - rom_path_t *rom_path = &rom_paths; + rom_path_t *rom_path; FILE *fp = NULL; if (strstr(fn, "roms/") == fn) { /* Relative path */ - for(rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { + for (rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { plat_append_filename(temp, rom_path->path, fn + 5); if ((fp = plat_fopen(temp, mode)) != NULL) { @@ -118,11 +118,11 @@ int rom_getfile(char *fn, char *s, int size) { char temp[1024]; - rom_path_t *rom_path = &rom_paths; + rom_path_t *rom_path; if (strstr(fn, "roms/") == fn) { /* Relative path */ - for(rom_path_t *rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { + for (rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { plat_append_filename(temp, rom_path->path, fn + 5); if (rom_present(temp)) { diff --git a/src/qt/qt_newfloppydialog.cpp b/src/qt/qt_newfloppydialog.cpp index 30b0fb674..576798e54 100644 --- a/src/qt/qt_newfloppydialog.cpp +++ b/src/qt/qt_newfloppydialog.cpp @@ -446,11 +446,6 @@ bool NewFloppyDialog::createZipSectorImage(const QString &filename, const disk_s uint32_t total_size = 0; uint32_t total_sectors = 0; uint32_t sector_bytes = 0; - uint32_t root_dir_bytes = 0; - uint32_t fat_size = 0; - uint32_t fat1_offs = 0; - uint32_t fat2_offs = 0; - uint32_t zero_bytes = 0; uint16_t base = 0x1000; uint32_t pbar_max = 0; @@ -466,11 +461,6 @@ bool NewFloppyDialog::createZipSectorImage(const QString &filename, const disk_s if (total_sectors > ZIP_SECTORS) total_sectors = ZIP_250_SECTORS; total_size = total_sectors * sector_bytes; - root_dir_bytes = (disk_size.root_dir_entries << 5); - fat_size = (disk_size.spfat * sector_bytes); - fat1_offs = sector_bytes; - fat2_offs = fat1_offs + fat_size; - zero_bytes = fat2_offs + fat_size + root_dir_bytes; pbar_max = total_size; if (type == FileType::Zdi) { diff --git a/src/qt/xinput2_mouse.cpp b/src/qt/xinput2_mouse.cpp index 0c31f6ca0..07791b5ba 100644 --- a/src/qt/xinput2_mouse.cpp +++ b/src/qt/xinput2_mouse.cpp @@ -48,7 +48,6 @@ int xi2flides[2] = { 0, 0 }; static Display* disp = nullptr; static QThread* procThread = nullptr; -static bool xi2childinit = false; static XIEventMask ximask; static std::atomic exitfromthread = false; static std::atomic xi2_mouse_x = 0, xi2_mouse_y = 0, xi2_mouse_abs_x = 0, xi2_mouse_abs_y = 0; @@ -106,7 +105,6 @@ void xinput2_proc() if (XGetEventData(disp, cookie) && cookie->type == GenericEvent && cookie->extension == xi2opcode) { switch (cookie->evtype) { case XI_RawMotion: { - static int ss = 0; const XIRawEvent *rawev = (const XIRawEvent*)cookie->data; double relative_coords[2] = { 0., 0. }; parse_valuators(rawev->raw_values,rawev->valuators.mask, diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index 6663080b8..8c8474f97 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -546,14 +546,8 @@ gd54xx_overlay_draw(svga_t *svga, int displine) int bpp = svga->bpp; int bytesperpix = (bpp + 7) / 8; uint8_t *src2 = &svga->vram[(svga->ma - (svga->hdisp * bytesperpix)) & svga->vram_display_mask]; - int w = gd54xx->overlay.r2sdz; int occl, ckval; - if (gd54xx->overlay.mode == 2) - w *= 4; - else - w *= 2; - p = &((uint32_t *)buffer32->line[displine])[gd54xx->overlay.region1size + svga->x_add]; src2 += gd54xx->overlay.region1size * bytesperpix; diff --git a/src/video/vid_herculesplus.c b/src/video/vid_herculesplus.c index 4233bec7b..ba981e06a 100644 --- a/src/video/vid_herculesplus.c +++ b/src/video/vid_herculesplus.c @@ -265,7 +265,7 @@ draw_char_rom(herculesplus_t *dev, int x, uint8_t chr, uint8_t attr) static void draw_char_ram4(herculesplus_t *dev, int x, uint8_t chr, uint8_t attr) { - unsigned ull, val, ifg, ibg, cfg; + unsigned ull, val, ibg, cfg; const uint8_t *fnt; int i, elg, blk; int cw = HERCULESPLUS_CW; @@ -280,17 +280,13 @@ draw_char_ram4(herculesplus_t *dev, int x, uint8_t chr, uint8_t attr) /* MDA-compatible attributes */ ibg = 0; - ifg = 7; if ((attr & 0x77) == 0x70) { /* Invert */ - ifg = 0; ibg = 7; } if (attr & 8) - ifg |= 8; /* High intensity FG */ if (attr & 0x80) ibg |= 8; /* High intensity BG */ if ((attr & 0x77) == 0) /* Blank */ - ifg = ibg; ull = ((attr & 0x07) == 1) ? 13 : 0xffff; if (dev->crtc[HERCULESPLUS_CRTC_XMODE] & HERCULESPLUS_XMODE_90COL) elg = 0; From 6862781b073137a9cf6dc4e0a49a020da013d8ee Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 07:03:14 +0500 Subject: [PATCH 60/78] Final warning fixes --- src/device/hwm_gl518sm.c | 3 +-- src/include/86box/86box.h | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/device/hwm_gl518sm.c b/src/device/hwm_gl518sm.c index 4afe016f2..102026294 100644 --- a/src/device/hwm_gl518sm.c +++ b/src/device/hwm_gl518sm.c @@ -31,8 +31,7 @@ #define CLAMP(a, min, max) (((a) < (min)) ? (min) : (((a) > (max)) ? (max) : (a))) /* Formulas and factors derived from Linux's gl518sm.c driver. */ -#define GL518SM_RPMDIV(r, d) (CLAMP((r), 1, 960000) * (d)) -#define GL518SM_RPM_TO_REG(r, d) ((r) ? CLAMP((480000 + GL518SM_RPMDIV(r, d) / 2) / GL518SM_RPMDIV(r, d), 1, 255) : 0) +#define GL518SM_RPM_TO_REG(r, d) ((r) ? CLAMP((480000 + (r) * (d) / 2) / (r) * (d), 1, 255) : 0) #define GL518SM_VOLTAGE_TO_REG(v) ((uint8_t) round((v) / 19.0)) #define GL518SM_VDD_TO_REG(v) ((uint8_t) (((v) * 4) / 95.0)) diff --git a/src/include/86box/86box.h b/src/include/86box/86box.h index 110a9d3d4..8b84100fd 100644 --- a/src/include/86box/86box.h +++ b/src/include/86box/86box.h @@ -42,6 +42,9 @@ #ifdef MAX #undef MAX #endif +#ifdef ABS +#undef ABS +#endif #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) From c1d97fc72abac1bcb2fde8a6d0adb7f945c3b3a7 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 14 Apr 2022 07:58:01 +0500 Subject: [PATCH 61/78] Fix some more remaining warnings --- src/codegen/codegen_ops_x86-64.h | 2 +- src/codegen_new/codegen_backend_x86-64_ops.c | 4 ++-- src/win/win_devconf.c | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/codegen/codegen_ops_x86-64.h b/src/codegen/codegen_ops_x86-64.h index 8f38b6b90..9184b4bff 100644 --- a/src/codegen/codegen_ops_x86-64.h +++ b/src/codegen/codegen_ops_x86-64.h @@ -28,7 +28,7 @@ static inline void call(codeblock_t *block, uintptr_t func) codegen_reg_loaded[0] = codegen_reg_loaded[1] = codegen_reg_loaded[2] = codegen_reg_loaded[3] = 0; codegen_reg_loaded[4] = codegen_reg_loaded[5] = codegen_reg_loaded[6] = codegen_reg_loaded[7] = 0; - if (diff >= -0x80000000 && diff < 0x7fffffff) + if (diff >= -0x80000000LL && diff < 0x7fffffffLL) { addbyte(0xE8); /*CALL*/ addlong((uint32_t)diff); diff --git a/src/codegen_new/codegen_backend_x86-64_ops.c b/src/codegen_new/codegen_backend_x86-64_ops.c index 32739668a..2baa0f585 100644 --- a/src/codegen_new/codegen_backend_x86-64_ops.c +++ b/src/codegen_new/codegen_backend_x86-64_ops.c @@ -32,7 +32,7 @@ static inline void call(codeblock_t *block, uintptr_t func) codegen_alloc_bytes(block, 5); diff = (intptr_t)(func - (uintptr_t)&block_write_data[block_pos + 5]); - if (diff >= -0x80000000 && diff < 0x7fffffff) + if (diff >= -0x80000000LL && diff < 0x7fffffffLL) { codegen_addbyte(block, 0xE8); /*CALL*/ codegen_addlong(block, (uint32_t)diff); @@ -53,7 +53,7 @@ static inline void jmp(codeblock_t *block, uintptr_t func) codegen_alloc_bytes(block, 5); diff = (intptr_t)(func - (uintptr_t)&block_write_data[block_pos + 5]); - if (diff >= -0x80000000 && diff < 0x7fffffff) + if (diff >= -0x80000000LL && diff < 0x7fffffffLL) { codegen_addbyte(block, 0xe9); /*JMP*/ codegen_addlong(block, (uint32_t)diff); diff --git a/src/win/win_devconf.c b/src/win/win_devconf.c index e8c178b91..804762af6 100644 --- a/src/win/win_devconf.c +++ b/src/win/win_devconf.c @@ -45,7 +45,10 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) { HWND h; - int val_int, id, c, d, num; + int val_int, id, c, d; +#ifdef USE_RTMIDI + int num; +#endif int changed, cid; const device_config_t *config; const device_config_selection_t *selection; From 100eaf70ee3ea340b89426b0f0ef2c5fa53864b2 Mon Sep 17 00:00:00 2001 From: Didiet Date: Sat, 16 Apr 2022 13:12:38 +0700 Subject: [PATCH 62/78] Fixing GdbStub Code to make it compiled with Clang (#2292) - Fix the switch scoping preventing declaration - Adding stdint.h as inclusion to make uint*_t works --- src/gdbstub.c | 9 ++++++++- src/include/86box/gdbstub.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gdbstub.c b/src/gdbstub.c index 20103c4cd..7ce2f360f 100644 --- a/src/gdbstub.c +++ b/src/gdbstub.c @@ -27,6 +27,7 @@ #else # include # include +# include #endif #define HAVE_STDARG_H #include <86box/86box.h> @@ -954,7 +955,7 @@ e14: /* Add our supported features to the end. */ if (client->response_pos < (sizeof(client->response) - 1)) client->response_pos += snprintf(&client->response[client->response_pos], sizeof(client->response) - client->response_pos, - "PacketSize=%X;swbreak+;hwbreak+;qXfer:features:read+", sizeof(client->packet) - 1); + "PacketSize=%lX;swbreak+;hwbreak+;qXfer:features:read+", sizeof(client->packet) - 1); break; } else if (!strcmp(client->response, "Xfer")) { /* Read the transfer object. */ @@ -1101,6 +1102,7 @@ unknown: case 'z': /* remove break/watchpoint */ case 'Z': /* insert break/watchpoint */ + { gdbstub_breakpoint_t *breakpoint, *prev_breakpoint = NULL, **first_breakpoint; /* Parse breakpoint type. */ @@ -1222,6 +1224,7 @@ unknown: /* Respond positively. */ goto ok; + } } end: /* Send response. */ @@ -1655,7 +1658,11 @@ gdbstub_init() .sin_port = htons(port) }; if (bind(gdbstub_socket, (struct sockaddr *) &bind_addr, sizeof(bind_addr)) == -1) { +#ifdef _WIN32 pclog("GDB Stub: Failed to bind on port %d (%d)\n", port, WSAGetLastError()); +#else + pclog("GDB Stup: Failed to bind on port %d (%d)\n", port, errno); +#endif gdbstub_socket = -1; return; } diff --git a/src/include/86box/gdbstub.h b/src/include/86box/gdbstub.h index 49eed2c45..4b2f8630a 100644 --- a/src/include/86box/gdbstub.h +++ b/src/include/86box/gdbstub.h @@ -16,6 +16,7 @@ */ #ifndef EMU_GDBSTUB_H #define EMU_GDBSTUB_H +#include #include <86box/mem.h> #define GDBSTUB_MEM_READ 0 From 12b30a81870be2640a7d4d23b492915d824549c3 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 16 Apr 2022 19:24:30 -0400 Subject: [PATCH 63/78] Inconsistency fixes --- src/machine/machine_table.c | 72 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 67a7b2641..373b75bb2 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -211,28 +211,28 @@ const machine_t machines[] = { { "[8088] VTech Laser Turbo XT", "ltxt", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_laserxt_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 256, 640, 256, 0,NULL, NULL }, #endif /* Has a standard PS/2 KBC (so, use IBM PS/2 Type 1). */ - { "[8088] Xi8088", "xi8088", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_xi8088_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_FLAGS_NONE, 64, 1024, 128, 127, xi8088_get_device}, + { "[8088] Xi8088", "xi8088", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_xi8088_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_FLAGS_NONE, 64, 1024, 128, 127, xi8088_get_device, NULL }, { "[8088] Z-NIX PC-1600", "znic", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_znic_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 64, 640, 64, 0, NULL, NULL }, { "[8088] Zenith Data Systems Z-151/152/161", "zdsz151", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_z151_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 64, 0, NULL, NULL }, { "[8088] Zenith Data Systems Z-159", "zdsz159", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_z159_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 64, 0, NULL, NULL }, - { "[8088] Zenith Data Systems SupersPort (Z-184)", "zdsupers", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_z184_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED, 128, 640, 128, 0, z184_get_device}, + { "[8088] Zenith Data Systems SupersPort (Z-184)", "zdsupers", MACHINE_TYPE_8088, MACHINE_CHIPSET_DISCRETE, machine_xt_z184_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED, 128, 640, 128, 0, z184_get_device, NULL }, { "[GC100A] Philips P3120", "p3120", MACHINE_TYPE_8088, MACHINE_CHIPSET_GC100A, machine_xt_p3120_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8088, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_XTA, 256, 768, 256, 0, NULL, NULL }, /* 8086 Machines */ - { "[8086] Amstrad PC1512", "pc1512", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc1512_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 8000000, 8000000, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 512, 640, 128, 63, pc1512_get_device}, - { "[8086] Amstrad PC1640", "pc1640", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc1640_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO | MACHINE_MOUSE, 640, 640, 640, 63, pc1640_get_device}, - { "[8086] Amstrad PC2086", "pc2086", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc2086_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 640, 640, 640, 63, pc2086_get_device}, - { "[8086] Amstrad PC3086", "pc3086", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc3086_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 640, 640, 640, 63, pc3086_get_device}, - { "[8086] Amstrad PC20(0)", "pc200", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc200_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 63, pc200_get_device}, - { "[8086] Amstrad PPC512/640", "ppc512", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_ppc512_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 63, ppc512_get_device}, + { "[8086] Amstrad PC1512", "pc1512", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc1512_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 8000000, 8000000, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 512, 640, 128, 63, pc1512_get_device, NULL }, + { "[8086] Amstrad PC1640", "pc1640", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc1640_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO | MACHINE_MOUSE, 640, 640, 640, 63, pc1640_get_device, NULL }, + { "[8086] Amstrad PC2086", "pc2086", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc2086_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 640, 640, 640, 63, pc2086_get_device, NULL }, + { "[8086] Amstrad PC3086", "pc3086", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc3086_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED | MACHINE_MOUSE, 640, 640, 640, 63, pc3086_get_device, NULL }, + { "[8086] Amstrad PC20(0)", "pc200", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_pc200_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 63, pc200_get_device, NULL }, + { "[8086] Amstrad PPC512/640", "ppc512", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_ppc512_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 63, ppc512_get_device, NULL }, { "[8086] Compaq Deskpro", "deskpro", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_xt_compaq_deskpro_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 128, 0, NULL, NULL }, - { "[8086] Olivetti M21/24/24SP", "m24", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_xt_m24_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO | MACHINE_MOUSE, 128, 640, 128, 0, m24_get_device}, + { "[8086] Olivetti M21/24/24SP", "m24", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_xt_m24_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO | MACHINE_MOUSE, 128, 640, 128, 0, m24_get_device, NULL }, /* Has Olivetti KBC firmware. */ { "[8086] Olivetti M240", "m240", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_xt_m240_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 128, 0, NULL, NULL }, { "[8086] Schetmash Iskra-3104", "iskra3104", MACHINE_TYPE_8086, MACHINE_CHIPSET_DISCRETE, machine_xt_iskra3104_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 128, 640, 128, 0, NULL, NULL }, - { "[8086] Tandy 1000 SL/2", "tandy1000sl2", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_tandy1000sl2_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED, 512, 768, 128, 0, tandy1k_sl_get_device}, + { "[8086] Tandy 1000 SL/2", "tandy1000sl2", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_tandy1000sl2_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO_FIXED, 512, 768, 128, 0, tandy1k_sl_get_device, NULL }, { "[8086] Victor V86P", "v86p", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_v86p_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO, 512, 1024, 128, 127, NULL, NULL }, - { "[8086] Toshiba T1200", "t1200", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_xt_t1200_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO, 1024, 2048,1024, 63, t1200_get_device}, + { "[8086] Toshiba T1200", "t1200", MACHINE_TYPE_8086, MACHINE_CHIPSET_PROPRIETARY, machine_xt_t1200_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_VIDEO, 1024, 2048,1024, 63, t1200_get_device, NULL }, #if defined(DEV_BRANCH) && defined(USE_LASERXT) { "[8086] VTech Laser XT3", "lxt3", MACHINE_TYPE_8086, MACHINE_CHIPSET_DISCRETE, machine_xt_lxt3_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_8086, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PC, MACHINE_FLAGS_NONE, 256, 640, 256, 0, NULL, NULL }, @@ -255,7 +255,7 @@ const machine_t machines[] = { /* Uses Compaq KBC firmware. */ { "[ISA] Compaq Portable II", "portableii", MACHINE_TYPE_286, MACHINE_CHIPSET_PROPRIETARY, machine_at_portableii_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 640, 16384, 128, 127, NULL, NULL }, /* Uses Compaq KBC firmware. */ - { "[ISA] Compaq Portable III", "portableiii", MACHINE_TYPE_286, MACHINE_CHIPSET_PROPRIETARY, machine_at_portableiii_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_VIDEO, 640, 16384, 128, 127, at_cpqiii_get_device }, + { "[ISA] Compaq Portable III", "portableiii", MACHINE_TYPE_286, MACHINE_CHIPSET_PROPRIETARY, machine_at_portableiii_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_VIDEO, 640, 16384, 128, 127, at_cpqiii_get_device, NULL }, /* Has IBM AT KBC firmware. */ { "[ISA] MR BIOS 286 clone", "mr286", MACHINE_TYPE_286, MACHINE_CHIPSET_DISCRETE, machine_at_mr286_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_286, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE, 512, 16384, 128, 127, NULL, NULL }, /* Has IBM AT KBC firmware. */ @@ -322,7 +322,7 @@ const machine_t machines[] = { /* Has an AMI KBC firmware, the only photo of this is too low resolution for me to read what's on the KBC chip, so I'm going to assume AMI 'F' based on the other known HT18 AMI BIOS strings. */ - { "[ALi M1217] Flytech 386", "flytech386", MACHINE_TYPE_386SX, MACHINE_CHIPSET_ALI_M1217, machine_at_flytech386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 1024, 16384, 1024, 127, at_flytech386_get_device }, + { "[ALi M1217] Flytech 386", "flytech386", MACHINE_TYPE_386SX, MACHINE_CHIPSET_ALI_M1217, machine_at_flytech386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 1024, 16384, 1024, 127, at_flytech386_get_device, NULL }, /* I'm going to assume this has a standard/generic IBM-compatible AT KBC firmware until the board is identified. */ { "[ALi M1217] MR BIOS 386SX clone", "mr1217", MACHINE_TYPE_386SX, MACHINE_CHIPSET_ALI_M1217, machine_at_mr1217_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 1024, 16384, 1024, 127, NULL, NULL }, @@ -333,7 +333,7 @@ const machine_t machines[] = { /* Has an AMI KBC firmware, the only photo of this is too low resolution for me to read what's on the KBC chip, so I'm going to assume AMI 'F' based on the other known HT18 AMI BIOS strings. */ - { "[HT18] AMA-932J", "ama932j", MACHINE_TYPE_386SX, MACHINE_CHIPSET_HT18, machine_at_ama932j_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE | MACHINE_VIDEO, 512, 8192, 128, 127, at_ama932j_get_device }, + { "[HT18] AMA-932J", "ama932j", MACHINE_TYPE_386SX, MACHINE_CHIPSET_HT18, machine_at_ama932j_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE | MACHINE_VIDEO, 512, 8192, 128, 127, at_ama932j_get_device, NULL }, /* Has an unknown KBC firmware with commands B8 and BB in the style of Phoenix MultiKey and AMIKey-3(!), but also commands E1 and EA with unknown functions. */ @@ -351,13 +351,13 @@ const machine_t machines[] = { /* Uses Commodore (CBM) KBC firmware, to be implemented as identical to the IBM PS/2 Type 1 KBC firmware unless evidence emerges of any proprietary commands. */ - { "[SCAMP] Commodore SL386SX-25", "cmdsl386sx25", MACHINE_TYPE_386SX, MACHINE_CHIPSET_VLSI_SCAMP, machine_at_cmdsl386sx25_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 1024, 8192, 512, 127, at_cmdsl386sx25_get_device }, + { "[SCAMP] Commodore SL386SX-25", "cmdsl386sx25", MACHINE_TYPE_386SX, MACHINE_CHIPSET_VLSI_SCAMP, machine_at_cmdsl386sx25_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 1024, 8192, 512, 127, at_cmdsl386sx25_get_device, NULL }, /* The closest BIOS string I find to this one's, differs only in one part, and ends in -8, so I'm going to assume that this, too, has an AMI '8' (AMI Keyboard BIOS Plus) KBC firmware. */ { "[SCAMP] DataExpert 386SX", "dataexpert386sx", MACHINE_TYPE_386SX, MACHINE_CHIPSET_VLSI_SCAMP, machine_at_dataexpert386sx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 10000000, 25000000, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 1024, 16384, 1024, 127, NULL, NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ - { "[SCAMP] Samsung SPC-6033P", "spc6033p", MACHINE_TYPE_386SX, MACHINE_CHIPSET_VLSI_SCAMP, machine_at_spc6033p_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 2048, 12288, 2048, 127, at_spc6033p_get_device }, + { "[SCAMP] Samsung SPC-6033P", "spc6033p", MACHINE_TYPE_386SX, MACHINE_CHIPSET_VLSI_SCAMP, machine_at_spc6033p_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 2048, 12288, 2048, 127, at_spc6033p_get_device, NULL }, /* Has an unknown AMI KBC firmware, I'm going to assume 'F' until a photo or real hardware BIOS string is found. */ { "[SCAT] KMX-C-02", "kmxc02", MACHINE_TYPE_386SX, MACHINE_CHIPSET_SCAT, machine_at_kmxc02_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386SX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 16384, 512, 127, NULL, NULL }, @@ -383,7 +383,7 @@ const machine_t machines[] = { #if defined(DEV_BRANCH) && defined(USE_DESKPRO386) { "[ISA] Compaq Deskpro 386", "deskpro386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_DISCRETE, machine_at_deskpro386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE, 1024, 14336, 1024, 127, NULL, NULL }, #endif - { "[ISA] Compaq Portable III (386)", "portableiii386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_DISCRETE, machine_at_portableiii386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE | MACHINE_VIDEO, 1024, 14336, 1024, 127, at_cpqiii_get_device }, + { "[ISA] Compaq Portable III (386)", "portableiii386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_DISCRETE, machine_at_portableiii386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_IDE | MACHINE_VIDEO, 1024, 14336, 1024, 127, at_cpqiii_get_device, NULL }, /* Has IBM AT KBC firmware. */ { "[ISA] Micronics 09-00021", "micronics386", MACHINE_TYPE_386DX, MACHINE_CHIPSET_DISCRETE, machine_at_micronics386_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_386DX, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_AT, MACHINE_FLAGS_NONE, 512, 8192, 128, 127, NULL, NULL }, /* Has AMIKey F KBC firmware. */ @@ -437,9 +437,9 @@ const machine_t machines[] = { /* According to Deksor on the Win3x.org forum, the BIOS string ends in a -0, indicating an unknown KBC firmware. But it does send the AMIKey get version command, so it must expect an AMIKey. */ - { "[VLSI 82C480] HP Vectra 486VL", "vect486vl", MACHINE_TYPE_486, MACHINE_CHIPSET_VLSI_VL82C480, machine_at_vect486vl_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 2048, 32768, 2048, 127, at_vect486vl_get_device }, + { "[VLSI 82C480] HP Vectra 486VL", "vect486vl", MACHINE_TYPE_486, MACHINE_CHIPSET_VLSI_VL82C480, machine_at_vect486vl_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 2048, 32768, 2048, 127, at_vect486vl_get_device, NULL }, /* Has a standard IBM PS/2 KBC firmware or a clone thereof. */ - { "[VLSI 82C481] Siemens Nixdorf D824", "d824", MACHINE_TYPE_486, MACHINE_CHIPSET_VLSI_VL82C481, machine_at_d824_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 2048, 32768, 2048, 127, at_d824_get_device }, + { "[VLSI 82C481] Siemens Nixdorf D824", "d824", MACHINE_TYPE_486, MACHINE_CHIPSET_VLSI_VL82C481, machine_at_d824_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET1, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 2048, 32768, 2048, 127, at_d824_get_device, NULL }, /* 486 machines - Socket 2 */ /* 486 machines with just the ISA slot */ @@ -447,7 +447,7 @@ const machine_t machines[] = { command C7 (OR input byte with received data byte). */ { "[ACC 2168] Packard Bell PB410A", "pb410a", MACHINE_TYPE_486_S2, MACHINE_CHIPSET_ACC_2168, machine_at_pb410a_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE | MACHINE_VIDEO, 4096, 36864, 1024, 127, NULL, NULL }, /* Uses an ACER/NEC 90M002A (UPD82C42C, 8042 clone) with unknown firmware (V4.01H). */ - { "[ALi M1429G] Acer A1G", "acera1g", MACHINE_TYPE_486_S2, MACHINE_CHIPSET_ALI_M1429G, machine_at_acera1g_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE_DUAL | MACHINE_VIDEO, 4096, 36864, 1024, 127, at_acera1g_get_device }, + { "[ALi M1429G] Acer A1G", "acera1g", MACHINE_TYPE_486_S2, MACHINE_CHIPSET_ALI_M1429G, machine_at_acera1g_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2, MACHINE_IDE_DUAL | MACHINE_VIDEO, 4096, 36864, 1024, 127, at_acera1g_get_device, NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ { "[ALi M1429G] Kaimei SA-486 VL-BUS M.B.", "win486", MACHINE_TYPE_486_S2, MACHINE_CHIPSET_ALI_M1429G, machine_at_winbios1429_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_VLB, MACHINE_IDE, 1024, 32768, 1024, 127, NULL, NULL }, /* Uses an Intel KBC with Phoenix MultiKey KBC firmware. */ @@ -483,7 +483,7 @@ const machine_t machines[] = { /* 486 machines which utilize the PCI bus */ /* This has an AMIKey-2, which is an updated version of type 'H'. */ - { "[ALi M1489] AAEON SBC-490", "sbc490", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_ALI_M1489, machine_at_sbc490_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 1024, 65536, 1024, 255, at_sbc490_get_device }, + { "[ALi M1489] AAEON SBC-490", "sbc490", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_ALI_M1489, machine_at_sbc490_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 1024, 65536, 1024, 255, at_sbc490_get_device, NULL }, /* Has the ALi M1487/9's on-chip keyboard controller which clones a standard AT KBC. */ { "[ALi M1489] ABIT AB-PB4", "abpb4", MACHINE_TYPE_486_S3, MACHINE_CHIPSET_ALI_M1489, machine_at_abpb4_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET3, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_PCI, MACHINE_IDE_DUAL, 1024, 65536, 1024, 255, NULL, NULL }, @@ -593,7 +593,7 @@ const machine_t machines[] = { /* Has AMI MegaKey KBC firmware. */ { "[i430LX] Micro Star 586MC1", "586mc1", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_INTEL_430LX, machine_at_586mc1_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 2048, 131072, 2048, 127, NULL, NULL }, /* This has the Phoenix MultiKey KBC firmware. */ - { "[i430LX] Packard Bell PB520R", "pb520r", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_INTEL_430LX, machine_at_pb520r_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 139264, 2048, 127, at_pb520r_get_device }, + { "[i430LX] Packard Bell PB520R", "pb520r", MACHINE_TYPE_SOCKET4, MACHINE_CHIPSET_INTEL_430LX, machine_at_pb520r_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET4, CPU_BLOCK_NONE, 60000000, 66666667, 5000, 5000, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 139264, 2048, 127, at_pb520r_get_device, NULL }, /* OPTi 596/597 */ /* This uses an AMI KBC firmware in PS/2 mode (it sends command A5 with the @@ -666,24 +666,24 @@ const machine_t machines[] = { { "[i430FX] Gateway 2000 Thor", "gw2katx", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_gw2katx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* The BIOS does not send a single non-standard KBC command, but the board has a SMC Super I/O chip with on-chip KBC and AMI MegaKey KBC firmware. */ - { "[i430FX] HP Vectra VL 5 Series 4", "vectra54", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_vectra54_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 511, at_vectra54_get_device }, + { "[i430FX] HP Vectra VL 5 Series 4", "vectra54", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_vectra54_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 2.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 511, at_vectra54_get_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'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i430FX] Intel Advanced/ATX", "thor", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_thor_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_thor_get_device }, + { "[i430FX] Intel Advanced/ATX", "thor", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_thor_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_thor_get_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'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i430FX] Intel Advanced/ATX (MR BIOS)", "mrthor", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_mrthor_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, at_mrthor_get_device }, + { "[i430FX] Intel Advanced/ATX (MR BIOS)", "mrthor", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_mrthor_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, at_mrthor_get_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'. Command 0xA0 copyright string: (C)1994 AMI . */ - { "[i430FX] Intel Advanced/EV", "endeavor", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_endeavor_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_endeavor_get_device }, + { "[i430FX] Intel Advanced/EV", "endeavor", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_endeavor_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_endeavor_get_device, NULL }, /* This has an AMIKey-2, which is an updated version of type 'H'. */ { "[i430FX] MSI MS-5119", "ms5119", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_ms5119_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* This most likely uses AMI MegaKey KBC firmware as well due to having the same Super I/O chip (that has the KBC firmware on it) as eg. the Advanced/EV. */ - { "[i430FX] Packard Bell PB640", "pb640", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_pb640_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_pb640_get_device }, + { "[i430FX] Packard Bell PB640", "pb640", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_pb640_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_pb640_get_device, NULL }, /* Has an AMI 'H' KBC firmware (1992). */ { "[i430FX] QDI FMB", "fmb", MACHINE_TYPE_SOCKET7_3V, MACHINE_CHIPSET_INTEL_430FX, machine_at_fmb_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_QDI_FMB, 50000000, 66666667, 3380, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, @@ -748,9 +748,9 @@ const machine_t machines[] = { { "[i430VX] Biostar MB-8500TVX-A", "8500tvxa", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_8500tvxa_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2600, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* The BIOS does not send a single non-standard KBC command, but the board has a SMC Super I/O chip with on-chip KBC and AMI MegaKey KBC firmware. */ - { "[i430VX] Compaq Presario 2240", "presario2240", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_presario2240_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_presario2240_get_device }, + { "[i430VX] Compaq Presario 2240", "presario2240", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_presario2240_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_presario2240_get_device, NULL }, /* This most likely has AMI MegaKey as above. */ - { "[i430VX] Compaq Presario 4500", "presario4500", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_presario4500_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_presario4500_get_device }, + { "[i430VX] Compaq Presario 4500", "presario4500", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_presario4500_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL | MACHINE_VIDEO, 8192, 131072, 8192, 127, at_presario4500_get_device, NULL }, /* The BIOS sends KBC command CB which is an AMI KBC command, so it has an AMI KBC firmware. */ { "[i430VX] Epox P55-VA", "p55va", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430VX, machine_at_p55va_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2500, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 131072, 8192, 127, NULL, NULL }, /* The BIOS does not send a single non-standard KBC command. */ @@ -905,7 +905,7 @@ const machine_t machines[] = { { "[i440BX] HP Vectra VEi 8", "vei8", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440BX, machine_at_vei8_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192,1048576, 8192, 255, NULL, NULL }, /* Has a National Semiconductors PC87309 Super I/O chip with on-chip KBC with most likely AMIKey-2 KBC firmware. */ - { "[i440BX] Tyan Tsunami ATX", "s1846", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440BX, machine_at_s1846_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 112121212, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL | MACHINE_SOUND, 8192,1048576, 8192, 255, at_s1846_get_device }, + { "[i440BX] Tyan Tsunami ATX", "s1846", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440BX, machine_at_s1846_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 112121212, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL | MACHINE_SOUND, 8192,1048576, 8192, 255, at_s1846_get_device, NULL }, /* Has a Winbond W83977TF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { "[i440BX] Supermicro P6SBA", "p6sba", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440BX, machine_at_p6sba_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, NULL, NULL }, @@ -913,10 +913,10 @@ const machine_t machines[] = { /* 440ZX */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440ZX] MSI MS-6168", "ms6168", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440ZX, machine_at_ms6168_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL | MACHINE_AV, 8192, 524288, 8192, 255, at_ms6168_get_device }, + { "[i440ZX] MSI MS-6168", "ms6168", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440ZX, machine_at_ms6168_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 100000000, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL | MACHINE_AV, 8192, 524288, 8192, 255, at_ms6168_get_device, NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440ZX] Packard Bell Bora Pro", "borapro", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440ZX, machine_at_borapro_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 66666667, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL | MACHINE_AV, 8192, 524288, 8192, 255, at_borapro_get_device }, + { "[i440ZX] Packard Bell Bora Pro", "borapro", MACHINE_TYPE_SLOT1, MACHINE_CHIPSET_INTEL_440ZX, machine_at_borapro_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK_NONE, 66666667, 66666667, 1800, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL | MACHINE_AV, 8192, 524288, 8192, 255, at_borapro_get_device, NULL }, /* SMSC VictoryBX-66 */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC @@ -944,7 +944,7 @@ const machine_t machines[] = { /* 440BX */ /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[i440BX] Tyan Trinity 371", "s1857", MACHINE_TYPE_SLOT1_370, MACHINE_CHIPSET_INTEL_440BX, machine_at_s1857_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1 | CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, at_s1857_get_device }, + { "[i440BX] Tyan Trinity 371", "s1857", MACHINE_TYPE_SLOT1_370, MACHINE_CHIPSET_INTEL_440BX, machine_at_s1857_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1 | CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL, 8192, 786432, 8192, 255, at_s1857_get_device, NULL }, /* Slot 2 machines */ /* 440GX */ @@ -994,17 +994,17 @@ const machine_t machines[] = { { "[VIA Apollo Pro 133A] Acorp 6VIA90AP", "6via90ap", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, machine_at_6via90ap_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 150000000, 1300, 3500, MACHINE_MULTIPLIER_FIXED, MACHINE_PS2_A97, MACHINE_IDE_DUAL | MACHINE_AG, 16384, 3145728, 8192, 255, NULL, NULL }, /* Has the VIA VT82C686B southbridge with on-chip KBC identical to the VIA VT82C42N. */ - { "[VIA Apollo Pro 133A] ASUS CUV4X-LS", "cuv4xls", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, machine_at_cuv4xls_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_PS2_NOI97, MACHINE_IDE_DUAL | MACHINE_SOUND, 16384, 4194304, 8192, 255, at_cuv4xls_get_device }, + { "[VIA Apollo Pro 133A] ASUS CUV4X-LS", "cuv4xls", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, machine_at_cuv4xls_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 150000000, 1300, 3500, 1.5, 8.0, MACHINE_PS2_NOI97, MACHINE_IDE_DUAL | MACHINE_SOUND, 16384, 4194304, 8192, 255, at_cuv4xls_get_device, NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ - { "[VIA Apollo Pro 133A] BCM GT694VA", "gt694va", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, machine_at_gt694va_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL | MACHINE_SOUND, 16384, 3145728, 8192, 255, at_gt694va_get_device }, + { "[VIA Apollo Pro 133A] BCM GT694VA", "gt694va", MACHINE_TYPE_SOCKET370, MACHINE_CHIPSET_VIA_APOLLO_PRO_133A, machine_at_gt694va_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET370, CPU_BLOCK_NONE, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_PS2_AGP, MACHINE_IDE_DUAL | MACHINE_SOUND, 16384, 3145728, 8192, 255, at_gt694va_get_device, NULL }, /* Miscellaneous/Fake/Hypervisor machines */ /* Has a Winbond W83977F Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { "[i440BX] Microsoft Virtual PC 2007", "vpc2007", MACHINE_TYPE_MISC, MACHINE_CHIPSET_INTEL_440BX, machine_at_vpc2007_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SLOT1, CPU_BLOCK(CPU_PENTIUM2, CPU_CYRIX3S), 0, 66666667, 0, 0, 0, 0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 1048576, 8192, 255, NULL, NULL }, - { NULL, NULL, MACHINE_TYPE_NONE, MACHINE_CHIPSET_NONE, NULL, 0, 0, MACHINE_AVAILABLE, 0 , 0, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_BUS_NONE, MACHINE_FLAGS_NONE, 0, 0, 0, 0, NULL } + { NULL, NULL, MACHINE_TYPE_NONE, MACHINE_CHIPSET_NONE, NULL, 0, 0, MACHINE_AVAILABLE, 0 , 0, CPU_BLOCK_NONE, 0, 0, 0, 0, 0, 0, MACHINE_BUS_NONE, MACHINE_FLAGS_NONE, 0, 0, 0, 0, NULL, NULL } }; int From d30a5c7ef30fe9fa06fcb7705e31a0660ff88ea5 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 18 Apr 2022 21:49:26 +0200 Subject: [PATCH 64/78] Removed a debug fatal() that should have been removed ages ago. --- src/cpu/x86seg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cpu/x86seg.c b/src/cpu/x86seg.c index f4f343f4f..67cf04222 100644 --- a/src/cpu/x86seg.c +++ b/src/cpu/x86seg.c @@ -258,9 +258,6 @@ do_seg_load(x86seg *s, uint16_t *segdat) else cpu_cur_status |= CPU_STATUS_NOTFLATSS; } - - if (s->base == 0xffffffff) - fatal("do_seg_load(): %04X%04X%04X%04X\n", segdat[3], segdat[2], segdat[1], segdat[0]); } From 27c78d40c51e9a8423e24b7892546a56741749d5 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 19 Apr 2022 18:36:30 -0400 Subject: [PATCH 65/78] Reorganise --- src/win/Makefile.mingw | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index f23bd97d3..d956b4586 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -64,6 +64,9 @@ ifeq ($(DEV_BUILD), y) ifndef MGA MGA := y endif + ifndef OLIVETTI + OLIVETTI := y + endif ifndef OPEN_AT OPEN_AT := y endif @@ -73,18 +76,15 @@ ifeq ($(DEV_BUILD), y) ifndef SIO_DETECT SIO_DETECT := y endif - ifndef VGAWONDER - VGAWONDER := y - endif ifndef TANDY_ISA TANDY_ISA := y endif + ifndef VGAWONDER + VGAWONDER := y + endif ifndef XL24 XL24 := y endif - ifndef OLIVETTI - OLIVETTI := y - endif ifndef NEW_KBC NEW_KBC := n endif @@ -125,6 +125,9 @@ else ifndef MGA MGA := n endif + ifndef OLIVETTI + OLIVETTI := n + endif ifndef OPEN_AT OPEN_AT := n endif @@ -134,18 +137,15 @@ else ifndef SIO_DETECT SIO_DETECT := n endif - ifndef VGAWONDER - VGAWONDER := n - endif ifndef TANDY_ISA TANDY_ISA := n endif + ifndef VGAWONDER + VGAWONDER := n + endif ifndef XL24 XL24 := n endif - ifndef OLIVETTI - OLIVETTI := n - endif ifndef NEW_KBC NEW_KBC := n endif From e60af6c29d87b1cd1e58a8435d9ca97567af2912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Tue, 19 Apr 2022 23:06:39 +0200 Subject: [PATCH 66/78] Clean up plat.h a bit --- src/86box.c | 32 +++++++++-------- src/cdrom/cdrom_image.c | 3 +- src/cdrom/cdrom_image_backend.c | 5 +-- src/config.c | 9 ++--- src/disk/hdd_image.c | 9 ++--- src/disk/mo.c | 3 +- src/floppy/fdd.c | 3 +- src/floppy/fdd_img.c | 3 +- src/gdbstub.c | 1 + src/include/86box/path.h | 7 ++++ src/include/86box/plat.h | 50 -------------------------- src/include/86box/thread.h | 46 ++++++++++++++++++++++++ src/mem/rom.c | 11 +++--- src/network/net_pcap.c | 1 + src/network/net_slirp.c | 1 + src/network/network.c | 1 + src/nvr.c | 3 +- src/printer/prt_escp.c | 9 ++--- src/printer/prt_ps.c | 9 ++--- src/printer/prt_text.c | 5 +-- src/qt/qt_platform.cpp | 21 +++++------ src/sound/midi_fluidsynth.c | 1 + src/sound/midi_mt32.c | 1 + src/sound/sound.c | 1 + src/thread.cpp | 1 + src/unix/unix.c | 24 +++++++------ src/unix/unix_thread.c | 1 + src/video/vid_ati_mach64.c | 1 + src/video/vid_im1024.c | 1 + src/video/vid_mga.c | 1 + src/video/vid_pgc.c | 1 + src/video/vid_s3.c | 1 + src/video/vid_s3_virge.c | 1 + src/video/vid_voodoo.c | 1 + src/video/vid_voodoo_banshee.c | 1 + src/video/vid_voodoo_banshee_blitter.c | 1 + src/video/vid_voodoo_blitter.c | 1 + src/video/vid_voodoo_display.c | 1 + src/video/vid_voodoo_fb.c | 1 + src/video/vid_voodoo_fifo.c | 1 + src/video/vid_voodoo_reg.c | 1 + src/video/vid_voodoo_render.c | 1 + src/video/vid_voodoo_setup.c | 1 + src/video/vid_voodoo_texture.c | 1 + src/video/video.c | 6 ++-- src/win/win.c | 18 +++++----- src/win/win_icon.c | 11 +++--- src/win/win_opengl.c | 1 + src/win/win_thread.c | 1 + 49 files changed, 184 insertions(+), 131 deletions(-) create mode 100644 src/include/86box/path.h create mode 100644 src/include/86box/thread.h diff --git a/src/86box.c b/src/86box.c index 8011b7e7c..4d59d9e13 100644 --- a/src/86box.c +++ b/src/86box.c @@ -91,7 +91,9 @@ #include <86box/snd_speaker.h> #include <86box/video.h> #include <86box/ui.h> +#include <86box/path.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/version.h> #include <86box/gdbstub.h> @@ -411,14 +413,14 @@ pc_init(int argc, char *argv[]) /* Grab the executable's full path. */ plat_get_exe_name(exe_path, sizeof(exe_path)-1); - p = plat_get_filename(exe_path); + p = path_get_filename(exe_path); *p = '\0'; #if !defined(_WIN32) && !defined(__APPLE__) /* Grab the actual path if we are an AppImage. */ appimage = getenv("APPIMAGE"); if (appimage && (appimage[0] != '\0')) { - plat_get_dirname(exe_path, appimage); + path_get_dirname(exe_path, appimage); } #endif @@ -557,8 +559,8 @@ usage: if (c != argc) goto usage; - plat_path_slash(usr_path); - plat_path_slash(rom_path); + path_slash(usr_path); + path_slash(rom_path); /* * If the user provided a path for files, use that @@ -567,7 +569,7 @@ usage: * make it absolute. */ if (ppath != NULL) { - if (! plat_path_abs(ppath)) { + if (! path_abs(ppath)) { /* * This looks like a relative path. * @@ -590,11 +592,11 @@ usage: } // Add the VM-local ROM path. - plat_append_filename(temp, usr_path, "roms"); + path_append_filename(temp, usr_path, "roms"); rom_add_path(temp); // Add the standard ROM path in the same directory as the executable. - plat_append_filename(temp, exe_path, "roms"); + path_append_filename(temp, exe_path, "roms"); rom_add_path(temp); plat_init_rom_paths(); @@ -606,7 +608,7 @@ usage: * make it absolute. */ if (rpath != NULL) { - if (! plat_path_abs(rpath)) { + if (! path_abs(rpath)) { /* * This looks like a relative path. * @@ -641,7 +643,7 @@ usage: * This can happen when people load a config * file using the UI, for example. */ - p = plat_get_filename(cfg); + p = path_get_filename(cfg); if (cfg != p) { /* * OK, the configuration file name has a @@ -656,19 +658,19 @@ usage: * Otherwise, assume the pathname given is * relative to whatever the usr_path is. */ - if (plat_path_abs(cfg)) + if (path_abs(cfg)) strcpy(usr_path, cfg); else strcat(usr_path, cfg); } /* Make sure we have a trailing backslash. */ - plat_path_slash(usr_path); + path_slash(usr_path); if (rom_path[0] != '\0') - plat_path_slash(rom_path); + path_slash(rom_path); /* At this point, we can safely create the full path name. */ - plat_append_filename(cfg_path, usr_path, p); + path_append_filename(cfg_path, usr_path, p); /* * Get the current directory's name @@ -679,8 +681,8 @@ usage: */ if (strlen(vm_name) == 0) { char ltemp[1024] = { '\0'}; - plat_get_dirname(ltemp, usr_path); - strcpy(vm_name, plat_get_filename(ltemp)); + path_get_dirname(ltemp, usr_path); + strcpy(vm_name, path_get_filename(ltemp)); } /* diff --git a/src/cdrom/cdrom_image.c b/src/cdrom/cdrom_image.c index 582b0631b..9a653b310 100644 --- a/src/cdrom/cdrom_image.c +++ b/src/cdrom/cdrom_image.c @@ -26,6 +26,7 @@ #define HAVE_STDARG_H #include <86box/86box.h> #include <86box/config.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/scsi_device.h> #include <86box/cdrom_image_backend.h> @@ -286,7 +287,7 @@ cdrom_image_open(cdrom_t *dev, const char *fn) return image_open_abort(dev); /* All good, reset state. */ - if (! strcasecmp(plat_get_extension((char *) fn), "ISO")) + if (! strcasecmp(path_get_extension((char *) fn), "ISO")) dev->cd_status = CD_STATUS_DATA_ONLY; else dev->cd_status = CD_STATUS_STOPPED; diff --git a/src/cdrom/cdrom_image_backend.c b/src/cdrom/cdrom_image_backend.c index 19f790cf3..72c49304a 100644 --- a/src/cdrom/cdrom_image_backend.c +++ b/src/cdrom/cdrom_image_backend.c @@ -33,6 +33,7 @@ #include #define HAVE_STDARG_H #include <86box/86box.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/cdrom_image_backend.h> @@ -831,7 +832,7 @@ cdi_load_cue(cd_img_t *cdi, const char *cuefile) /* Get a copy of the filename into pathname, we need it later. */ memset(pathname, 0, MAX_FILENAME_LENGTH * sizeof(char)); - plat_get_dirname(pathname, cuefile); + path_get_dirname(pathname, cuefile); /* Open the file. */ fp = plat_fopen(cuefile, "r"); @@ -986,7 +987,7 @@ cdi_load_cue(cd_img_t *cdi, const char *cuefile) if (!strcmp(type, "BINARY")) { memset(temp, 0, MAX_FILENAME_LENGTH * sizeof(char)); - plat_append_filename(filename, pathname, ansi); + path_append_filename(filename, pathname, ansi); trk.file = track_file_init(filename, &error); } if (error) { diff --git a/src/config.c b/src/config.c index 27f0fb9ee..556a13b09 100644 --- a/src/config.c +++ b/src/config.c @@ -63,6 +63,7 @@ #include <86box/midi.h> #include <86box/snd_mpu401.h> #include <86box/video.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/plat_dir.h> #include <86box/ui.h> @@ -1422,12 +1423,12 @@ load_hard_disks(void) wcsncpy(hdd[c].fn, &wp[wcslen(usr_path)], sizeof_w(hdd[c].fn)); } else #endif - if (plat_path_abs(p)) { + if (path_abs(p)) { strncpy(hdd[c].fn, p, sizeof(hdd[c].fn) - 1); } else { - plat_append_filename(hdd[c].fn, usr_path, p); + path_append_filename(hdd[c].fn, usr_path, p); } - plat_path_normalize(hdd[c].fn); + path_normalize(hdd[c].fn); /* If disk is empty or invalid, mark it for deletion. */ if (! hdd_is_valid(c)) { @@ -2841,7 +2842,7 @@ save_hard_disks(void) sprintf(temp, "hdd_%02i_fn", c+1); if (hdd_is_valid(c) && (strlen(hdd[c].fn) != 0)) { - plat_path_normalize(hdd[c].fn); + path_normalize(hdd[c].fn); if (!strnicmp(hdd[c].fn, usr_path, strlen(usr_path))) config_set_string(cat, temp, &hdd[c].fn[strlen(usr_path)]); else diff --git a/src/disk/hdd_image.c b/src/disk/hdd_image.c index d0ec68fc4..eff860804 100644 --- a/src/disk/hdd_image.c +++ b/src/disk/hdd_image.c @@ -27,6 +27,7 @@ #include #define HAVE_STDARG_H #include <86box/86box.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/random.h> #include <86box/hdd.h> @@ -76,7 +77,7 @@ hdd_image_log(const char *fmt, ...) int image_is_hdi(const char *s) { - if (! strcasecmp(plat_get_extension((char *) s), "HDI")) + if (! strcasecmp(path_get_extension((char *) s), "HDI")) return 1; else return 0; @@ -90,7 +91,7 @@ image_is_hdx(const char *s, int check_signature) uint64_t filelen; uint64_t signature; - if (! strcasecmp(plat_get_extension((char *) s), "HDX")) { + if (! strcasecmp(path_get_extension((char *) s), "HDX")) { if (check_signature) { f = plat_fopen(s, "rb"); if (!f) @@ -124,7 +125,7 @@ image_is_vhd(const char *s, int check_signature) { FILE* f; - if (! strcasecmp(plat_get_extension((char *) s), "VHD")) { + if (! strcasecmp(path_get_extension((char *) s), "VHD")) { if (check_signature) { f = plat_fopen(s, "rb"); if (!f) @@ -251,7 +252,7 @@ hdd_image_load(int id) memset(empty_sector, 0, sizeof(empty_sector)); if (fn) { - plat_path_normalize(fn); + path_normalize(fn); } diff --git a/src/disk/mo.c b/src/disk/mo.c index a07349e59..d30cf9d94 100644 --- a/src/disk/mo.c +++ b/src/disk/mo.c @@ -33,6 +33,7 @@ #include <86box/device.h> #include <86box/scsi_device.h> #include <86box/nvr.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/ui.h> #include <86box/hdc.h> @@ -332,7 +333,7 @@ mo_load_abort(mo_t *dev) int image_is_mdi(const char *s) { - if (! strcasecmp(plat_get_extension((char *) s), "MDI")) + if (! strcasecmp(path_get_extension((char *) s), "MDI")) return 1; else return 0; diff --git a/src/floppy/fdd.c b/src/floppy/fdd.c index 1344c3f02..2f3dd4fc9 100644 --- a/src/floppy/fdd.c +++ b/src/floppy/fdd.c @@ -26,6 +26,7 @@ #define HAVE_STDARG_H #include <86box/86box.h> #include <86box/timer.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/ui.h> #include <86box/fdd.h> @@ -485,7 +486,7 @@ fdd_load(int drive, char *fn) if (!fn) return; - p = plat_get_extension(fn); + p = path_get_extension(fn); if (!p) return; f = plat_fopen(fn, "rb"); diff --git a/src/floppy/fdd_img.c b/src/floppy/fdd_img.c index a8704e7ff..722a25af9 100644 --- a/src/floppy/fdd_img.c +++ b/src/floppy/fdd_img.c @@ -33,6 +33,7 @@ #include <86box/86box.h> #include <86box/timer.h> #include <86box/config.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/fdd.h> #include <86box/fdd_86f.h> @@ -644,7 +645,7 @@ img_load(int drive, char *fn) int size; int i; - ext = plat_get_extension(fn); + ext = path_get_extension(fn); d86f_unregister(drive); diff --git a/src/gdbstub.c b/src/gdbstub.c index 7ce2f360f..8ef15d7c8 100644 --- a/src/gdbstub.c +++ b/src/gdbstub.c @@ -38,6 +38,7 @@ #include <86box/io.h> #include <86box/mem.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/gdbstub.h> #define FAST_RESPONSE(s) \ diff --git a/src/include/86box/path.h b/src/include/86box/path.h new file mode 100644 index 000000000..85cb0814d --- /dev/null +++ b/src/include/86box/path.h @@ -0,0 +1,7 @@ +extern void path_get_dirname(char *dest, const char *path); +extern char *path_get_filename(char *s); +extern char *path_get_extension(char *s); +extern void path_append_filename(char *dest, const char *s1, const char *s2); +extern void path_slash(char *path); +extern void path_normalize(char *path); +extern int path_abs(char *path); \ No newline at end of file diff --git a/src/include/86box/plat.h b/src/include/86box/plat.h index ad7006165..1f787da9e 100644 --- a/src/include/86box/plat.h +++ b/src/include/86box/plat.h @@ -105,15 +105,6 @@ extern int plat_chdir(char *path); extern void plat_tempfile(char *bufp, char *prefix, char *suffix); extern void plat_get_exe_name(char *s, int size); extern void plat_init_rom_paths(); -extern char *plat_get_basename(const char *path); -extern void plat_get_dirname(char *dest, const char *path); -extern char *plat_get_filename(char *s); -extern char *plat_get_extension(char *s); -extern void plat_append_filename(char *dest, const char *s1, const char *s2); -extern void plat_put_backslash(char *s); -extern void plat_path_slash(char *path); -extern void plat_path_normalize(char *path); -extern int plat_path_abs(char *path); extern int plat_dir_check(char *path); extern int plat_dir_create(char *path); extern void *plat_mmap(size_t size, uint8_t executable); @@ -169,47 +160,6 @@ extern int ioctl_open(uint8_t id, char d); extern void ioctl_reset(uint8_t id); extern void ioctl_close(uint8_t id); -#ifdef __APPLE__ -#define thread_t plat_thread_t -#define event_t plat_event_t -#define mutex_t plat_mutex_t - -#define thread_create plat_thread_create -#define thread_wait plat_thread_wait -#define thread_create_event plat_thread_create_event -#define thread_set_event plat_thread_set_event -#define thread_reset_event plat_thread_reset_event -#define thread_wait_event plat_thread_wait_event -#define thread_destroy_event plat_thread_destroy_event - -#define thread_create_mutex plat_thread_create_mutex -#define thread_create_mutex_with_spin_count plat_thread_create_mutex_with_spin_count -#define thread_close_mutex plat_thread_close_mutex -#define thread_wait_mutex plat_thread_wait_mutex -#define thread_release_mutex plat_thread_release_mutex -#endif - -/* Thread support. */ -typedef void thread_t; -typedef void event_t; -typedef void mutex_t; - -extern thread_t *thread_create(void (*thread_func)(void *param), void *param); -extern int thread_wait(thread_t *arg); -extern event_t *thread_create_event(void); -extern void thread_set_event(event_t *arg); -extern void thread_reset_event(event_t *arg); -extern int thread_wait_event(event_t *arg, int timeout); -extern void thread_destroy_event(event_t *arg); - -#define MUTEX_DEFAULT_SPIN_COUNT 1024 - -extern mutex_t *thread_create_mutex(void); -extern void thread_close_mutex(mutex_t *arg); -extern int thread_test_mutex(mutex_t *arg); -extern int thread_wait_mutex(mutex_t *arg); -extern int thread_release_mutex(mutex_t *mutex); - /* Other stuff. */ extern void startblit(void); extern void endblit(void); diff --git a/src/include/86box/thread.h b/src/include/86box/thread.h new file mode 100644 index 000000000..a34dbefb5 --- /dev/null +++ b/src/include/86box/thread.h @@ -0,0 +1,46 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __APPLE__ +#define thread_t plat_thread_t +#define event_t plat_event_t +#define mutex_t plat_mutex_t + +#define thread_create plat_thread_create +#define thread_wait plat_thread_wait +#define thread_create_event plat_thread_create_event +#define thread_set_event plat_thread_set_event +#define thread_reset_event plat_thread_reset_event +#define thread_wait_event plat_thread_wait_event +#define thread_destroy_event plat_thread_destroy_event + +#define thread_create_mutex plat_thread_create_mutex +#define thread_create_mutex_with_spin_count plat_thread_create_mutex_with_spin_count +#define thread_close_mutex plat_thread_close_mutex +#define thread_wait_mutex plat_thread_wait_mutex +#define thread_release_mutex plat_thread_release_mutex +#endif + +/* Thread support. */ +typedef void thread_t; +typedef void event_t; +typedef void mutex_t; + +extern thread_t *thread_create(void (*thread_func)(void *param), void *param); +extern int thread_wait(thread_t *arg); +extern event_t *thread_create_event(void); +extern void thread_set_event(event_t *arg); +extern void thread_reset_event(event_t *arg); +extern int thread_wait_event(event_t *arg, int timeout); +extern void thread_destroy_event(event_t *arg); + +extern mutex_t *thread_create_mutex(void); +extern void thread_close_mutex(mutex_t *arg); +extern int thread_test_mutex(mutex_t *arg); +extern int thread_wait_mutex(mutex_t *arg); +extern int thread_release_mutex(mutex_t *mutex); + +#ifdef __cplusplus +} +#endif diff --git a/src/mem/rom.c b/src/mem/rom.c index 3373ca530..62b03bc11 100644 --- a/src/mem/rom.c +++ b/src/mem/rom.c @@ -33,6 +33,7 @@ #include "cpu.h" #include <86box/mem.h> #include <86box/rom.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/machine.h> #include <86box/m_xt_xi8088.h> @@ -76,16 +77,16 @@ rom_add_path(const char* path) } // Save the path, turning it into absolute if needed. - if (!plat_path_abs((char*) path)) { + if (!path_abs((char*) path)) { plat_getcwd(cwd, sizeof(cwd)); - plat_path_slash(cwd); + path_slash(cwd); snprintf(rom_path->path, sizeof(rom_path->path), "%s%s", cwd, path); } else { snprintf(rom_path->path, sizeof(rom_path->path), "%s", path); } // Ensure the path ends with a separator. - plat_path_slash(rom_path->path); + path_slash(rom_path->path); } @@ -99,7 +100,7 @@ rom_fopen(char *fn, char *mode) if (strstr(fn, "roms/") == fn) { /* Relative path */ for (rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { - plat_append_filename(temp, rom_path->path, fn + 5); + path_append_filename(temp, rom_path->path, fn + 5); if ((fp = plat_fopen(temp, mode)) != NULL) { return fp; @@ -123,7 +124,7 @@ rom_getfile(char *fn, char *s, int size) if (strstr(fn, "roms/") == fn) { /* Relative path */ for (rom_path = &rom_paths; rom_path != NULL; rom_path = rom_path->next) { - plat_append_filename(temp, rom_path->path, fn + 5); + path_append_filename(temp, rom_path->path, fn + 5); if (rom_present(temp)) { strncpy(s, temp, size); diff --git a/src/network/net_pcap.c b/src/network/net_pcap.c index 52573907b..049cd661a 100644 --- a/src/network/net_pcap.c +++ b/src/network/net_pcap.c @@ -55,6 +55,7 @@ #include <86box/device.h> #include <86box/plat.h> #include <86box/plat_dynld.h> +#include <86box/thread.h> #include <86box/network.h> diff --git a/src/network/net_slirp.c b/src/network/net_slirp.c index fc4afcf78..bc7c68783 100644 --- a/src/network/net_slirp.c +++ b/src/network/net_slirp.c @@ -30,6 +30,7 @@ #include <86box/86box.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/network.h> #include <86box/machine.h> #include <86box/timer.h> diff --git a/src/network/network.c b/src/network/network.c index 8f84be44e..49915024a 100644 --- a/src/network/network.c +++ b/src/network/network.c @@ -61,6 +61,7 @@ #include <86box/device.h> #include <86box/timer.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/ui.h> #include <86box/network.h> #include <86box/net_3c503.h> diff --git a/src/nvr.c b/src/nvr.c index 7f44981c2..b73aa6fa7 100644 --- a/src/nvr.c +++ b/src/nvr.c @@ -58,6 +58,7 @@ #include <86box/machine.h> #include <86box/mem.h> #include <86box/timer.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/nvr.h> @@ -213,7 +214,7 @@ nvr_path(char *str) plat_dir_create(temp); /* Now append the actual filename. */ - plat_path_slash(temp); + path_slash(temp); strcat(temp, str); return(temp); diff --git a/src/printer/prt_escp.c b/src/printer/prt_escp.c index e5f43257c..ec07dc95f 100644 --- a/src/printer/prt_escp.c +++ b/src/printer/prt_escp.c @@ -63,6 +63,7 @@ #include <86box/mem.h> #include <86box/rom.h> #include <86box/pit.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/plat_dynld.h> #include <86box/ui.h> @@ -596,7 +597,7 @@ update_font(escp_t *dev) /* Create a full pathname for the ROM file. */ strcpy(path, dev->fontpath); - plat_path_slash(path); + path_slash(path); strcat(path, fn); escp_log("Temp file=%s\n", path); @@ -2062,14 +2063,14 @@ escp_init(void *lpt) } strcpy(dev->fontpath, exe_path); - plat_path_slash(dev->fontpath); + path_slash(dev->fontpath); strcat(dev->fontpath, "roms/printer/fonts/"); /* Create the full path for the page images. */ - plat_append_filename(dev->pagepath, usr_path, "printer"); + path_append_filename(dev->pagepath, usr_path, "printer"); if (! plat_dir_check(dev->pagepath)) plat_dir_create(dev->pagepath); - plat_path_slash(dev->pagepath); + path_slash(dev->pagepath); dev->page_width = PAGE_WIDTH; dev->page_height = PAGE_HEIGHT; diff --git a/src/printer/prt_ps.c b/src/printer/prt_ps.c index e90e19e82..231707897 100644 --- a/src/printer/prt_ps.c +++ b/src/printer/prt_ps.c @@ -27,6 +27,7 @@ #include <86box/lpt.h> #include <86box/timer.h> #include <86box/pit.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/plat_dynld.h> #include <86box/ui.h> @@ -152,7 +153,7 @@ convert_to_pdf(ps_t *dev) char input_fn[1024], output_fn[1024], *gsargv[9]; strcpy(input_fn, dev->printer_path); - plat_path_slash(input_fn); + path_slash(input_fn); strcat(input_fn, dev->filename); strcpy(output_fn, input_fn); @@ -206,7 +207,7 @@ write_buffer(ps_t *dev, bool finish) plat_tempfile(dev->filename, NULL, ".ps"); strcpy(path, dev->printer_path); - plat_path_slash(path); + path_slash(path); strcat(path, dev->filename); fp = plat_fopen(path, "a"); @@ -365,10 +366,10 @@ ps_init(void *lpt) /* Cache print folder path. */ memset(dev->printer_path, 0x00, sizeof(dev->printer_path)); - plat_append_filename(dev->printer_path, usr_path, "printer"); + path_append_filename(dev->printer_path, usr_path, "printer"); if (!plat_dir_check(dev->printer_path)) plat_dir_create(dev->printer_path); - plat_path_slash(dev->printer_path); + path_slash(dev->printer_path); timer_add(&dev->pulse_timer, pulse_timer, dev, 0); timer_add(&dev->timeout_timer, timeout_timer, dev, 0); diff --git a/src/printer/prt_text.c b/src/printer/prt_text.c index 7c791227f..c57a4fef3 100644 --- a/src/printer/prt_text.c +++ b/src/printer/prt_text.c @@ -60,6 +60,7 @@ #include <86box/device.h> #include <86box/timer.h> #include <86box/pit.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/lpt.h> #include <86box/printer.h> @@ -150,10 +151,10 @@ dump_page(prnt_t *dev) /* Create the full path for this file. */ memset(path, 0x00, sizeof(path)); - plat_append_filename(path, usr_path, "printer"); + path_append_filename(path, usr_path, "printer"); if (! plat_dir_check(path)) plat_dir_create(path); - plat_path_slash(path); + path_slash(path); strcat(path, dev->filename); /* Create the file. */ diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 366e05970..499c6bbac 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -88,6 +88,7 @@ extern "C" { #include <86box/gameport.h> #include <86box/timer.h> #include <86box/nvr.h> +#include <86box/path.h> #include <86box/plat_dynld.h> #include <86box/mem.h> #include <86box/rom.h> @@ -140,7 +141,7 @@ void plat_get_exe_name(char *s, int size) memcpy(s, exepath_temp.data(), std::min((qsizetype)exepath_temp.size(),(qsizetype)size)); - plat_path_slash(s); + path_slash(s); } uint32_t @@ -188,14 +189,14 @@ plat_getcwd(char *bufp, int max) } void -plat_get_dirname(char *dest, const char *path) +path_get_dirname(char *dest, const char *path) { QFileInfo fi(path); CharPointer(dest, -1) = fi.dir().path().toUtf8(); } char * -plat_get_extension(char *s) +path_get_extension(char *s) { auto len = strlen(s); auto idx = QByteArray::fromRawData(s, len).lastIndexOf('.'); @@ -206,7 +207,7 @@ plat_get_extension(char *s) } char * -plat_get_filename(char *s) +path_get_filename(char *s) { #ifdef Q_OS_WINDOWS int c = strlen(s) - 1; @@ -228,7 +229,7 @@ plat_get_filename(char *s) } int -plat_path_abs(char *path) +path_abs(char *path) { #ifdef Q_OS_WINDOWS if ((path[1] == ':') || (path[0] == '\\') || (path[0] == '/')) @@ -241,7 +242,7 @@ plat_path_abs(char *path) } void -plat_path_normalize(char* path) +path_normalize(char* path) { #ifdef Q_OS_WINDOWS while (*path++ != 0) @@ -252,7 +253,7 @@ plat_path_normalize(char* path) } void -plat_path_slash(char *path) +path_slash(char *path) { auto len = strlen(path); auto separator = '/'; @@ -260,14 +261,14 @@ plat_path_slash(char *path) path[len] = separator; path[len+1] = 0; } - plat_path_normalize(path); + path_normalize(path); } void -plat_append_filename(char *dest, const char *s1, const char *s2) +path_append_filename(char *dest, const char *s1, const char *s2) { strcpy(dest, s1); - plat_path_slash(dest); + path_slash(dest); strcat(dest, s2); } diff --git a/src/sound/midi_fluidsynth.c b/src/sound/midi_fluidsynth.c index 7f3d39383..749c74b9f 100644 --- a/src/sound/midi_fluidsynth.c +++ b/src/sound/midi_fluidsynth.c @@ -15,6 +15,7 @@ # include <86box/midi.h> # include <86box/plat.h> # include <86box/plat_dynld.h> +# include <86box/thread.h> # include <86box/sound.h> # include <86box/ui.h> diff --git a/src/sound/midi_mt32.c b/src/sound/midi_mt32.c index 87255e319..bb86210f3 100644 --- a/src/sound/midi_mt32.c +++ b/src/sound/midi_mt32.c @@ -9,6 +9,7 @@ #include <86box/mem.h> #include <86box/midi.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/rom.h> #include <86box/sound.h> #include <86box/ui.h> diff --git a/src/sound/sound.c b/src/sound/sound.c index 5110b9c59..ec9e51f91 100644 --- a/src/sound/sound.c +++ b/src/sound/sound.c @@ -33,6 +33,7 @@ #include <86box/machine.h> #include <86box/midi.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/snd_ac97.h> #include <86box/snd_azt2316a.h> #include <86box/timer.h> diff --git a/src/thread.cpp b/src/thread.cpp index 1003dd871..6a7af25b8 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -3,6 +3,7 @@ #include #include <86box/plat.h> +#include <86box/thread.h> struct event_cpp11_t { diff --git a/src/unix/unix.c b/src/unix/unix.c index e4be19e05..a7ef1abe7 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -27,8 +27,10 @@ #include <86box/keyboard.h> #include <86box/mouse.h> #include <86box/config.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/plat_dynld.h> +#include <86box/thread.h> #include <86box/device.h> #include <86box/gameport.h> #include <86box/unix_sdl.h> @@ -293,24 +295,24 @@ plat_fopen64(const char *path, const char *mode) } int -plat_path_abs(char *path) +path_abs(char *path) { return path[0] == '/'; } void -plat_path_normalize(char* path) +path_normalize(char* path) { /* No-op. */ } void -plat_path_slash(char *path) +path_slash(char *path) { if ((path[strlen(path)-1] != '/')) { strcat(path, "/"); } - plat_path_normalize(path); + path_normalize(path); } void @@ -337,7 +339,7 @@ plat_get_basename(const char *path) return((char *)path); } char * -plat_get_filename(char *s) +path_get_filename(char *s) { int c = strlen(s) - 1; @@ -352,7 +354,7 @@ plat_get_filename(char *s) char * -plat_get_extension(char *s) +path_get_extension(char *s) { int c = strlen(s) - 1; @@ -370,10 +372,10 @@ plat_get_extension(char *s) void -plat_append_filename(char *dest, const char *s1, const char *s2) +path_append_filename(char *dest, const char *s1, const char *s2) { strcpy(dest, s1); - plat_path_slash(dest); + path_slash(dest); strcat(dest, s2); } @@ -485,7 +487,7 @@ ui_sb_update_text() } void -plat_get_dirname(char *dest, const char *path) +path_get_dirname(char *dest, const char *path) { int c = (int)strlen(path); char *ptr; @@ -758,7 +760,7 @@ plat_init_rom_paths() if (getenv("XDG_DATA_HOME")) { char xdg_rom_path[1024] = { 0 }; strncpy(xdg_rom_path, getenv("XDG_DATA_HOME"), 1024); - plat_path_slash(xdg_rom_path); + path_slash(xdg_rom_path); strncat(xdg_rom_path, "86Box/", 1024); if (!plat_dir_check(xdg_rom_path)) @@ -791,7 +793,7 @@ plat_init_rom_paths() while ((cur_xdg_rom_path = local_strsep(&xdg_rom_paths, ";")) != NULL) { char real_xdg_rom_path[1024] = { '\0' }; strcat(real_xdg_rom_path, cur_xdg_rom_path); - plat_path_slash(real_xdg_rom_path); + path_slash(real_xdg_rom_path); strcat(real_xdg_rom_path, "86Box/roms/"); rom_add_path(real_xdg_rom_path); } diff --git a/src/unix/unix_thread.c b/src/unix/unix_thread.c index 564b1943b..dc7625e12 100644 --- a/src/unix/unix_thread.c +++ b/src/unix/unix_thread.c @@ -5,6 +5,7 @@ #include #include <86box/86box.h> #include <86box/plat.h> +#include <86box/thread.h> typedef struct event_pthread_t diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index 3caa710e7..2fe70c322 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -31,6 +31,7 @@ #include <86box/pci.h> #include <86box/rom.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/i2c.h> #include <86box/vid_ddc.h> diff --git a/src/video/vid_im1024.c b/src/video/vid_im1024.c index 96ce1ce6a..932faecb7 100644 --- a/src/video/vid_im1024.c +++ b/src/video/vid_im1024.c @@ -62,6 +62,7 @@ #include <86box/device.h> #include <86box/pit.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_pgc.h> diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index bfb83d9c2..87ed16ba5 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -27,6 +27,7 @@ #include <86box/device.h> #include <86box/dma.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/i2c.h> #include <86box/vid_ddc.h> diff --git a/src/video/vid_pgc.c b/src/video/vid_pgc.c index 3d64b9eaf..e956cb12e 100644 --- a/src/video/vid_pgc.c +++ b/src/video/vid_pgc.c @@ -87,6 +87,7 @@ #include <86box/device.h> #include <86box/pit.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_cga.h> #include <86box/vid_pgc.h> diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index ba86de08a..406f6a20e 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -30,6 +30,7 @@ #include <86box/pci.h> #include <86box/rom.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/i2c.h> #include <86box/vid_ddc.h> diff --git a/src/video/vid_s3_virge.c b/src/video/vid_s3_virge.c index 9aa5b0973..dd1c03fa4 100644 --- a/src/video/vid_s3_virge.c +++ b/src/video/vid_s3_virge.c @@ -32,6 +32,7 @@ #include <86box/rom.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/i2c.h> #include <86box/vid_ddc.h> diff --git a/src/video/vid_voodoo.c b/src/video/vid_voodoo.c index 7631dcf8f..df3d59076 100644 --- a/src/video/vid_voodoo.c +++ b/src/video/vid_voodoo.c @@ -32,6 +32,7 @@ #include <86box/timer.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_svga.h> #include <86box/vid_voodoo_common.h> diff --git a/src/video/vid_voodoo_banshee.c b/src/video/vid_voodoo_banshee.c index 48d14a5b6..020cb65a4 100644 --- a/src/video/vid_voodoo_banshee.c +++ b/src/video/vid_voodoo_banshee.c @@ -32,6 +32,7 @@ #include <86box/timer.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/i2c.h> #include <86box/vid_ddc.h> diff --git a/src/video/vid_voodoo_banshee_blitter.c b/src/video/vid_voodoo_banshee_blitter.c index 4d8ba2518..4062acb3a 100644 --- a/src/video/vid_voodoo_banshee_blitter.c +++ b/src/video/vid_voodoo_banshee_blitter.c @@ -24,6 +24,7 @@ #include <86box/timer.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_svga.h> #include <86box/vid_voodoo_common.h> diff --git a/src/video/vid_voodoo_blitter.c b/src/video/vid_voodoo_blitter.c index f60ed2c0b..94fb9dfa1 100644 --- a/src/video/vid_voodoo_blitter.c +++ b/src/video/vid_voodoo_blitter.c @@ -30,6 +30,7 @@ #include <86box/timer.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_svga.h> #include <86box/vid_voodoo_common.h> diff --git a/src/video/vid_voodoo_display.c b/src/video/vid_voodoo_display.c index a52249bee..8e4e952d2 100644 --- a/src/video/vid_voodoo_display.c +++ b/src/video/vid_voodoo_display.c @@ -29,6 +29,7 @@ #include <86box/timer.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_svga.h> #include <86box/vid_voodoo_common.h> diff --git a/src/video/vid_voodoo_fb.c b/src/video/vid_voodoo_fb.c index b9ccad399..3ab482bff 100644 --- a/src/video/vid_voodoo_fb.c +++ b/src/video/vid_voodoo_fb.c @@ -29,6 +29,7 @@ #include <86box/timer.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_svga.h> #include <86box/vid_voodoo_common.h> diff --git a/src/video/vid_voodoo_fifo.c b/src/video/vid_voodoo_fifo.c index fcc87af11..013c21db3 100644 --- a/src/video/vid_voodoo_fifo.c +++ b/src/video/vid_voodoo_fifo.c @@ -29,6 +29,7 @@ #include <86box/timer.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_svga.h> #include <86box/vid_voodoo_common.h> diff --git a/src/video/vid_voodoo_reg.c b/src/video/vid_voodoo_reg.c index 796f0aac7..797fa130f 100644 --- a/src/video/vid_voodoo_reg.c +++ b/src/video/vid_voodoo_reg.c @@ -29,6 +29,7 @@ #include <86box/timer.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_svga.h> #include <86box/vid_voodoo_common.h> diff --git a/src/video/vid_voodoo_render.c b/src/video/vid_voodoo_render.c index 751c91d09..362f45abe 100644 --- a/src/video/vid_voodoo_render.c +++ b/src/video/vid_voodoo_render.c @@ -29,6 +29,7 @@ #include <86box/timer.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_svga.h> #include <86box/vid_voodoo_common.h> diff --git a/src/video/vid_voodoo_setup.c b/src/video/vid_voodoo_setup.c index e8722608f..92a984c87 100644 --- a/src/video/vid_voodoo_setup.c +++ b/src/video/vid_voodoo_setup.c @@ -29,6 +29,7 @@ #include <86box/timer.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_svga.h> #include <86box/vid_voodoo_common.h> diff --git a/src/video/vid_voodoo_texture.c b/src/video/vid_voodoo_texture.c index 80bf53d23..784ea17fe 100644 --- a/src/video/vid_voodoo_texture.c +++ b/src/video/vid_voodoo_texture.c @@ -29,6 +29,7 @@ #include <86box/timer.h> #include <86box/device.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_svga.h> #include <86box/vid_voodoo_common.h> diff --git a/src/video/video.c b/src/video/video.c index a950369c4..f58b29c84 100644 --- a/src/video/video.c +++ b/src/video/video.c @@ -66,7 +66,9 @@ #include <86box/rom.h> #include <86box/config.h> #include <86box/timer.h> +#include <86box/path.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/vid_svga.h> @@ -404,12 +406,12 @@ video_screenshot(uint32_t *buf, int start_x, int start_y, int row_len) memset(fn, 0, sizeof(fn)); memset(path, 0, sizeof(path)); - plat_append_filename(path, usr_path, SCREENSHOT_PATH); + path_append_filename(path, usr_path, SCREENSHOT_PATH); if (! plat_dir_check(path)) plat_dir_create(path); - plat_path_slash(path); + path_slash(path); plat_tempfile(fn, NULL, ".png"); strcat(path, fn); diff --git a/src/win/win.c b/src/win/win.c index 18f3a1697..cd938217e 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -47,8 +47,10 @@ #include <86box/video.h> #include <86box/mem.h> #include <86box/rom.h> +#include <86box/path.h> #define GLOBAL #include <86box/plat.h> +#include <86box/thread.h> #include <86box/ui.h> #ifdef USE_VNC # include <86box/vnc.h> @@ -736,14 +738,14 @@ plat_remove(char *path) } void -plat_path_normalize(char* path) +path_normalize(char* path) { /* No-op */ } /* Make sure a path ends with a trailing (back)slash. */ void -plat_path_slash(char *path) +path_slash(char *path) { if ((path[strlen(path)-1] != '\\') && (path[strlen(path)-1] != '/')) { @@ -754,7 +756,7 @@ plat_path_slash(char *path) /* Check if the given path is absolute or not. */ int -plat_path_abs(char *path) +path_abs(char *path) { if ((path[1] == ':') || (path[0] == '\\') || (path[0] == '/')) return(1); @@ -781,7 +783,7 @@ plat_get_basename(const char *path) /* Return the 'directory' element of a pathname. */ void -plat_get_dirname(char *dest, const char *path) +path_get_dirname(char *dest, const char *path) { int c = (int)strlen(path); char *ptr; @@ -804,7 +806,7 @@ plat_get_dirname(char *dest, const char *path) char * -plat_get_filename(char *s) +path_get_filename(char *s) { int c = strlen(s) - 1; @@ -819,7 +821,7 @@ plat_get_filename(char *s) char * -plat_get_extension(char *s) +path_get_extension(char *s) { int c = strlen(s) - 1; @@ -837,10 +839,10 @@ plat_get_extension(char *s) void -plat_append_filename(char *dest, const char *s1, const char *s2) +path_append_filename(char *dest, const char *s1, const char *s2) { strcpy(dest, s1); - plat_path_slash(dest); + path_slash(dest); strcat(dest, s2); } diff --git a/src/win/win_icon.c b/src/win/win_icon.c index e118276f1..c11125ecd 100644 --- a/src/win/win_icon.c +++ b/src/win/win_icon.c @@ -23,6 +23,7 @@ #include #include <86box/86box.h> #include <86box/config.h> +#include <86box/path.h> #include <86box/plat.h> #include <86box/ui.h> #include <86box/win.h> @@ -116,10 +117,10 @@ void win_get_icons_path(char* path_root) if (rom_path[0]) strcpy(roms_root, rom_path); else - plat_append_filename(roms_root, exe_path, "roms"); + path_append_filename(roms_root, exe_path, "roms"); - plat_append_filename(path_root, roms_root, "icons"); - plat_path_slash(path_root); + path_append_filename(path_root, roms_root, "icons"); + path_slash(path_root); } void win_load_icon_set() @@ -137,13 +138,13 @@ void win_load_icon_set() win_get_icons_path(path_root); strcat(path_root, icon_set); - plat_path_slash(path_root); + path_slash(path_root); int i, count = sizeof(icon_files) / sizeof(_ICON_DATA), x = win_get_system_metrics(SM_CXSMICON, dpi), y = win_get_system_metrics(SM_CYSMICON, dpi); for (i = 0; i < count; i++) { - plat_append_filename(temp, path_root, icon_files[i].filename); + path_append_filename(temp, path_root, icon_files[i].filename); mbstoc16s(wtemp, temp, strlen(temp) + 1); HICON ictemp; diff --git a/src/win/win_opengl.c b/src/win/win_opengl.c index 5670fafa2..b1dab78ca 100644 --- a/src/win/win_opengl.c +++ b/src/win/win_opengl.c @@ -54,6 +54,7 @@ typedef LONG atomic_flag; #include <86box/86box.h> #include <86box/plat.h> +#include <86box/thread.h> #include <86box/video.h> #include <86box/win.h> #include <86box/language.h> diff --git a/src/win/win_thread.c b/src/win/win_thread.c index 2bb8a6cf5..1ad0fc469 100644 --- a/src/win/win_thread.c +++ b/src/win/win_thread.c @@ -29,6 +29,7 @@ #include #include <86box/86box.h> #include <86box/plat.h> +#include <86box/thread.h> typedef struct { From 60d70da4b94a086bcb5bdfb8b213c73ce9339d43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Tue, 19 Apr 2022 23:24:49 +0200 Subject: [PATCH 67/78] Make sure `exe_path` ends with a slash --- src/86box.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/86box.c b/src/86box.c index 4d59d9e13..a98a69993 100644 --- a/src/86box.c +++ b/src/86box.c @@ -424,6 +424,8 @@ pc_init(int argc, char *argv[]) } #endif + path_slash(exe_path); + /* * Get the current working directory. * From 11a1cd4d87ccbb665329cf78d69e3b8e33d2b70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Wed, 20 Apr 2022 01:02:21 +0200 Subject: [PATCH 68/78] Hide the `-E` parameter as it is not implemented yet --- src/86box.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/86box.c b/src/86box.c index a98a69993..4b647afed 100644 --- a/src/86box.c +++ b/src/86box.c @@ -448,6 +448,8 @@ usage: printf("-C or --config path - set 'path' to be config file\n"); #ifdef _WIN32 printf("-D or --debug - force debug output logging\n"); +#endif +#if 0 printf("-E or --nographic - forces the old behavior\n"); #endif printf("-F or --fullscreen - start in fullscreen mode\n"); From 6a4b3fc7bb2801b6470f44c6a1c9d8b38edb53b5 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 20 Apr 2022 01:16:16 +0200 Subject: [PATCH 69/78] Enabled the non-blocking stuff for Windows as well. --- src/network/net_pcap.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/network/net_pcap.c b/src/network/net_pcap.c index b1541cdc6..c76b62581 100644 --- a/src/network/net_pcap.c +++ b/src/network/net_pcap.c @@ -123,9 +123,7 @@ static const unsigned char *(*f_pcap_next)(void *,void *); static int (*f_pcap_sendpacket)(void *,const unsigned char *,int); static void (*f_pcap_close)(void *); -#ifndef _WIN32 static int (*f_pcap_setnonblock)(void*, int, char*); -#endif static dllimp_t pcap_imports[] = { { "pcap_lib_version", &f_pcap_lib_version }, { "pcap_findalldevs", &f_pcap_findalldevs }, @@ -136,9 +134,7 @@ static dllimp_t pcap_imports[] = { { "pcap_next", &f_pcap_next }, { "pcap_sendpacket", &f_pcap_sendpacket }, { "pcap_close", &f_pcap_close }, -#ifndef _WIN32 { "pcap_setnonblock", &f_pcap_setnonblock }, -#endif { NULL, NULL }, }; @@ -389,10 +385,8 @@ net_pcap_reset(const netcard_t *card, uint8_t *mac) pcap_log(" Unable to open device: %s!\n", network_host); return(-1); } -#ifndef _WIN32 if (f_pcap_setnonblock((void*)pcap, 1, errbuf) != 0) pcap_log("PCAP: failed nonblock %s\n", errbuf); -#endif pcap_log("PCAP: interface: %s\n", network_host); From 7e9dbffc3bc99162a9c7c8e9d0db1ec27ce1caa0 Mon Sep 17 00:00:00 2001 From: richardg867 Date: Wed, 20 Apr 2022 13:27:57 -0300 Subject: [PATCH 70/78] macOS: Change exe_path to be next to the .app bundle --- src/86box.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/86box.c b/src/86box.c index 4b647afed..720e33279 100644 --- a/src/86box.c +++ b/src/86box.c @@ -398,9 +398,6 @@ pc_init(int argc, char *argv[]) { char *ppath = NULL, *rpath = NULL; char *cfg = NULL, *p; -#if !defined(__APPLE__) && !defined(_WIN32) - char *appimage; -#endif char temp[2048]; struct tm *info; time_t now; @@ -413,15 +410,20 @@ pc_init(int argc, char *argv[]) /* Grab the executable's full path. */ plat_get_exe_name(exe_path, sizeof(exe_path)-1); - p = path_get_filename(exe_path); + p = path_get_filename(exe_path); *p = '\0'; - -#if !defined(_WIN32) && !defined(__APPLE__) - /* Grab the actual path if we are an AppImage. */ - appimage = getenv("APPIMAGE"); - if (appimage && (appimage[0] != '\0')) { - path_get_dirname(exe_path, appimage); +#if defined(__APPLE__) + c = strlen(exe_path); + if ((c >= 16) && !strcmp(&exe_path[c - 16], "/Contents/MacOS/")) { + exe_path[c - 16] = '\0'; + p = path_get_filename(exe_path); + *p = '\0'; } +#elif !defined(_WIN32) + /* Grab the actual path if we are an AppImage. */ + p = getenv("APPIMAGE"); + if (p && (p[0] != '\0')) + path_get_dirname(exe_path, p); #endif path_slash(exe_path); From de82cf8bf1d3c281edaa2240a99c004ba209bf7a Mon Sep 17 00:00:00 2001 From: richardg867 Date: Wed, 20 Apr 2022 13:35:14 -0300 Subject: [PATCH 71/78] macOS: Fix plat_getcwd on .app bundle --- src/qt/qt_platform.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 499c6bbac..9a2f2d8a2 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -184,7 +184,12 @@ plat_dir_check(char *path) int plat_getcwd(char *bufp, int max) { +#ifdef __APPLE__ + /* Working directory for .app bundles is undefined. */ + strncpy(bufp, exe_path, max); +#else CharPointer(bufp, max) = QDir::currentPath().toUtf8(); +#endif return 0; } From 0208555e8c37bc15c2a56bc4528cf8b3dd219cb6 Mon Sep 17 00:00:00 2001 From: richardg867 Date: Wed, 20 Apr 2022 14:01:38 -0300 Subject: [PATCH 72/78] Jenkins: Cache Linux library downloads and change rtmidi URL --- .ci/build.sh | 55 ++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/.ci/build.sh b/.ci/build.sh index 590119cc4..5442a512f 100644 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -568,59 +568,64 @@ then fi else cwd_root=$(pwd) + cache_dir="$HOME/86box-build-cache" + [ ! -d "$cache_dir" ] && mkdir -p "$cache_dir" if grep -q "OPENAL:BOOL=ON" build/CMakeCache.txt then # Build openal-soft 1.21.1 manually to fix audio issues. This is a temporary # workaround until a newer version of openal-soft trickles down to Debian repos. - if [ -d "openal-soft-1.21.1" ] + prefix="$cache_dir/openal-soft-1.21.1" + if [ -d "$prefix" ] then - rm -rf openal-soft-1.21.1/build + rm -rf "$prefix/build" else - wget -qO - https://github.com/kcat/openal-soft/archive/refs/tags/1.21.1.tar.gz | tar zxf - + wget -qO - https://github.com/kcat/openal-soft/archive/refs/tags/1.21.1.tar.gz | tar zxf - -C "$cache_dir" || rm -rf "$prefix" fi - cmake -G Ninja -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S openal-soft-1.21.1 -B openal-soft-1.21.1/build || exit 99 - cmake --build openal-soft-1.21.1/build -j$(nproc) || exit 99 - cmake --install openal-soft-1.21.1/build || exit 99 + cmake -G Ninja -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -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 # Build SDL2 without sound systems. sdl_ss=OFF else # Build FAudio 22.03 manually to remove the dependency on GStreamer. This is a temporary # workaround until a newer version of FAudio trickles down to Debian repos. - if [ -d "FAudio-22.03" ] + prefix="$cache_dir/FAudio-22.03" + if [ -d "$prefix" ] then - rm -rf FAudio-22.03/build + rm -rf "$prefix/build" else - wget -qO - https://github.com/FNA-XNA/FAudio/archive/refs/tags/22.03.tar.gz | tar zxf - + wget -qO - https://github.com/FNA-XNA/FAudio/archive/refs/tags/22.03.tar.gz | tar zxf - -C "$cache_dir" || rm -rf "$prefix" fi - cmake -G Ninja -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S FAudio-22.03 -B FAudio-22.03/build || exit 99 - cmake --build FAudio-22.03/build -j$(nproc) || exit 99 - cmake --install FAudio-22.03/build || exit 99 + cmake -G Ninja -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -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 # Build SDL2 with sound systems. sdl_ss=ON fi # Build rtmidi without JACK support to remove the dependency on libjack. - if [ -d "rtmidi-4.0.0" ] + prefix="$cache_dir/rtmidi-4.0.0" + if [ -d "$prefix" ] then - rm -rf rtmidi-4.0.0/build + rm -rf "$prefix/build" else - wget -qO - http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz | tar zxf - + wget -qO - https://github.com/thestk/rtmidi/archive/refs/tags/4.0.0.tar.gz | tar zxf - -C "$cache_dir" || rm -rf "$prefix" fi - cmake -G Ninja -D RTMIDI_API_JACK=OFF -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S rtmidi-4.0.0 -B rtmidi-4.0.0/build || exit 99 - cmake --build rtmidi-4.0.0/build -j$(nproc) || exit 99 - cmake --install rtmidi-4.0.0/build || exit 99 + cmake -G Ninja -D RTMIDI_API_JACK=OFF -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -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 # Build SDL2 for joystick and FAudio support, with most components # disabled to remove the dependencies on PulseAudio and libdrm. - if [ ! -d "SDL2-2.0.20" ] + prefix="$cache_dir/SDL2-2.0.20" + if [ ! -d "$prefix" ] then - wget -qO - https://www.libsdl.org/release/SDL2-2.0.20.tar.gz | tar zxf - + wget -qO - https://www.libsdl.org/release/SDL2-2.0.20.tar.gz | tar zxf - -C "$cache_dir" || rm -rf "$prefix" fi - rm -rf sdlbuild - mkdir sdlbuild + rm -rf "$cache_dir/sdlbuild" cmake -G Ninja -D SDL_DISKAUDIO=OFF -D SDL_DIRECTFB_SHARED=OFF -D SDL_OPENGL=OFF -D SDL_OPENGLES=OFF -D SDL_OSS=OFF -D SDL_ALSA=$sdl_ss \ -D SDL_ALSA_SHARED=$sdl_ss -D SDL_JACK=$sdl_ss -D SDL_JACK_SHARED=$sdl_ss -D SDL_ESD=OFF -D SDL_ESD_SHARED=OFF -D SDL_PIPEWIRE=$sdl_ss \ -D SDL_PIPEWIRE_SHARED=$sdl_ss -D SDL_PULSEAUDIO=$sdl_ss -D SDL_PULSEAUDIO_SHARED=$sdl_ss -D SDL_ARTS=OFF -D SDL_ARTS_SHARED=OFF \ @@ -628,10 +633,10 @@ else -D SDL_FUSIONSOUND_SHARED=OFF -D SDL_LIBSAMPLERATE=$sdl_ss -D SDL_LIBSAMPLERATE_SHARED=$sdl_ss -D SDL_X11=OFF -D SDL_X11_SHARED=OFF \ -D SDL_WAYLAND=OFF -D SDL_WAYLAND_SHARED=OFF -D SDL_WAYLAND_LIBDECOR=OFF -D SDL_WAYLAND_LIBDECOR_SHARED=OFF -D SDL_WAYLAND_QT_TOUCH=OFF \ -D SDL_RPI=OFF -D SDL_VIVANTE=OFF -D SDL_VULKAN=OFF -D SDL_KMSDRM=OFF -D SDL_KMSDRM_SHARED=OFF -D SDL_OFFSCREEN=OFF \ - -D SDL_HIDAPI_JOYSTICK=ON -D SDL_VIRTUAL_JOYSTICK=ON -D SDL_SHARED=ON -D SDL_STATIC=OFF -S SDL2-2.0.20 -B sdlbuild \ + -D SDL_HIDAPI_JOYSTICK=ON -D SDL_VIRTUAL_JOYSTICK=ON -D SDL_SHARED=ON -D SDL_STATIC=OFF -S "$prefix" -B "$cache_dir/sdlbuild" \ -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" || exit 99 - cmake --build sdlbuild -j$(nproc) || exit 99 - cmake --install sdlbuild || exit 99 + cmake --build "$cache_dir/sdlbuild" -j$(nproc) || exit 99 + cmake --install "$cache_dir/sdlbuild" || exit 99 # Archive Discord Game SDK library. 7z e -y -o"archive_tmp/usr/lib" discord_game_sdk.zip "lib/$arch_discord/discord_game_sdk.so" From a62e3aff238d519e93c46d29872619d9968f6bcf Mon Sep 17 00:00:00 2001 From: richardg867 Date: Wed, 20 Apr 2022 20:51:39 -0300 Subject: [PATCH 73/78] Selectable mouse type on Linux, part 1 --- src/qt/qt_rendererstack.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qt/qt_rendererstack.hpp b/src/qt/qt_rendererstack.hpp index 9133a4927..eb3adf894 100644 --- a/src/qt/qt_rendererstack.hpp +++ b/src/qt/qt_rendererstack.hpp @@ -64,6 +64,11 @@ public: rendererWindow->onResize(width, height); } + void (*mouse_init)() = nullptr; + void (*mouse_poll)() = nullptr; + void (*mouse_capture)(QWindow *window) = nullptr; + void (*mouse_uncapture)() = nullptr; + signals: void blitToRenderer(int buf_idx, int x, int y, int w, int h); void rendererChanged(); From 5f070c8f745daa4177ca21310ddec25283c41926 Mon Sep 17 00:00:00 2001 From: richardg867 Date: Wed, 20 Apr 2022 20:54:41 -0300 Subject: [PATCH 74/78] Selectable mouse type on Linux, part 2 --- src/qt/qt_rendererstack.cpp | 58 +++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index 88b2395d5..9186ee86f 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -50,21 +50,43 @@ RendererStack::RendererStack(QWidget *parent) ui->setupUi(this); #if defined __unix__ && !defined __HAIKU__ -# ifdef WAYLAND - if (QApplication::platformName().contains("wayland")) { - wl_init(); + char *mouse_type = getenv("EMU86BOX_MOUSE"), auto_mouse_type[16]; + if (!mouse_type || (mouse_type[0] == '\0') || !stricmp(mouse_type, "auto")) { + if (QApplication::platformName().contains("wayland")) + strcpy(auto_mouse_type, "wayland"); + else if (QApplication::platformName() == "eglfs") + strcpy(auto_mouse_type, "evdev"); + else if (QApplication::platformName() == "xcb") + strcpy(auto_mouse_type, "xinput2"); + else + auto_mouse_type[0] = '\0'; + mouse_type = auto_mouse_type; } + +# ifdef WAYLAND + if (!stricmp(mouse_type, "wayland")) { + this->mouse_init = wl_init; + this->mouse_poll = wl_mouse_poll; + this->mouse_capture = wl_mouse_capture; + this->mouse_uncapture = wl_mouse_uncapture; + } else # endif # ifdef EVDEV_INPUT - if (QApplication::platformName() == "eglfs") { - evdev_init(); - } + if (!stricmp(mouse_type, "evdev")) { + this->mouse_init = evdev_init; + this->mouse_poll = evdev_mouse_poll; + } else # endif - if (QApplication::platformName() == "xcb") { + if (!stricmp(mouse_type, "xinput2")) { extern void xinput2_init(); - xinput2_init(); + extern void xinput2_poll(); + this->mouse_init = xinput2_init; + this->mouse_poll = xinput2_poll; } #endif + + if (this->mouse_init) + this->mouse_init(); } RendererStack::~RendererStack() @@ -104,23 +126,9 @@ RendererStack::mousePoll() mousedata.deltax = mousedata.deltay = mousedata.deltaz = 0; mouse_buttons = mousedata.mousebuttons; -# if defined __unix__ && !defined __HAIKU__ -# ifdef WAYLAND - if (QApplication::platformName().contains("wayland")) - wl_mouse_poll(); -# endif - -# ifdef EVDEV_INPUT - if (QApplication::platformName() == "eglfs") - evdev_mouse_poll(); - else -# endif - if (QApplication::platformName() == "xcb") { - extern void xinput2_poll(); - xinput2_poll(); - } -# endif /* defined __unix__ */ -#endif /* !defined __APPLE__ */ + if (this->mouse_poll) + this->mouse_poll(); +#endif /* !defined __APPLE__ */ } int ignoreNextMouseEvent = 1; From 5810f39f4d502a1040b35a8c7f132d5aec04a8ff Mon Sep 17 00:00:00 2001 From: richardg867 Date: Wed, 20 Apr 2022 20:55:26 -0300 Subject: [PATCH 75/78] Selectable mouse type on Linux, part 3 --- src/qt/qt_mainwindow.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 09676ee34..6a55d6f6a 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -207,18 +207,12 @@ MainWindow::MainWindow(QWidget *parent) : qt_mouse_capture(mouse_capture); if (mouse_capture) { this->grabKeyboard(); -#ifdef WAYLAND - if (QGuiApplication::platformName().contains("wayland")) { - wl_mouse_capture(this->windowHandle()); - } -#endif + if (ui->stackedWidget->mouse_capture) + ui->stackedWidget->mouse_capture(this->windowHandle()); } else { this->releaseKeyboard(); -#ifdef WAYLAND - if (QGuiApplication::platformName().contains("wayland")) { - wl_mouse_uncapture(); - } -#endif + if (ui->stackedWidget->mouse_uncapture) + ui->stackedWidget->mouse_uncapture(); } }); From f6e3c0d02996bf3c5c6ba97208070023f4edc191 Mon Sep 17 00:00:00 2001 From: richardg867 Date: Wed, 20 Apr 2022 21:37:38 -0300 Subject: [PATCH 76/78] Selectable mouse type on Linux, part 4 --- src/qt/qt_rendererstack.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/qt_rendererstack.hpp b/src/qt/qt_rendererstack.hpp index eb3adf894..89f300ada 100644 --- a/src/qt/qt_rendererstack.hpp +++ b/src/qt/qt_rendererstack.hpp @@ -68,6 +68,7 @@ public: void (*mouse_poll)() = nullptr; void (*mouse_capture)(QWindow *window) = nullptr; void (*mouse_uncapture)() = nullptr; + void (*mouse_exit)() = nullptr; signals: void blitToRenderer(int buf_idx, int x, int y, int w, int h); From 0af6605042d73004713797e7176c313a7522cc57 Mon Sep 17 00:00:00 2001 From: richardg867 Date: Wed, 20 Apr 2022 21:38:57 -0300 Subject: [PATCH 77/78] Selectable mouse type on Linux, part 5 --- src/qt/qt_rendererstack.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index 9186ee86f..3e20f1f40 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -80,8 +80,10 @@ RendererStack::RendererStack(QWidget *parent) if (!stricmp(mouse_type, "xinput2")) { extern void xinput2_init(); extern void xinput2_poll(); + extern void xinput2_exit(); this->mouse_init = xinput2_init; this->mouse_poll = xinput2_poll; + this->mouse_exit = xinput2_exit; } #endif From 7d6ad0d6504cdcf62d40079611e6d37731d2c426 Mon Sep 17 00:00:00 2001 From: richardg867 Date: Wed, 20 Apr 2022 21:39:57 -0300 Subject: [PATCH 78/78] Selectable mouse type on Linux, part 6 --- src/qt/qt_mainwindow.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 6a55d6f6a..3058ca59f 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -509,10 +509,8 @@ void MainWindow::closeEvent(QCloseEvent *event) { } qt_nvr_save(); config_save(); -#if defined __unix__ && !defined __HAIKU__ - extern void xinput2_exit(); - if (QApplication::platformName() == "xcb") xinput2_exit(); -#endif + if (ui->stackedWidget->mouse_exit) + ui->stackedWidget->mouse_exit(); event->accept(); }